I have several pages:
login, account, messages and more.
login page - is a simple page with a form to login so it has no side menu.
annount page and messages page have content and side menu, so I dont want to duplicate my codes, how do handle that with 2 different views.
this is my code for routing and the index html
index.html
<body ng-app="bloompy" class="bloompyBg">
<div id="main" ng-controller="mainController">
<!-- angular templating -->
<!-- this is where content will be injected -->
<div id="wrapper" ng-view></div>
</div>
</body>
and the app.js
app.config(function($routeProvider) {
$routeProvider
// route for the home page
.when('/', {
templateUrl : 'pages/main.html'
})
.when('/login', {
templateUrl : 'pages/login.html'
})
// route for the about page
.when('/spot', {
templateUrl : 'pages/spot.html'
})
// route for the contact page
.when('/profile', {
templateUrl : 'pages/profile.html'
});
});