In angular I have defined my routes like this:
config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {templateUrl: 'pages/main.html', controller: 'MainController'});
$routeProvider.when('/login', {templateUrl: 'pages/login.html', controller: 'AccountController'});
$routeProvider.otherwise({redirectTo: '/'});
}]);
So my web site loads the pages/main.html
page inside my index.html
. When I goto #/login
then my pages/login.html
inside index.html
.
But I actually don't want to load page/login.html
inside index.html
. I want my login page to have its own layout.
So is there a way to load login.html
in such a way so that it's not included inside index.html
as a partial, but so that it can have it's own base layout?