I don't know how to "include" partials on templates. For example, I've an template "index". When the user navigate to "/" I like re render some divs on "index" from partials (login box and some others text div), when de user navigate to "/newAccount" I like re render same divs on "index" but with others partials.
The question is, it's the correcly way to use of AngularJS? Similar to the includes on Facelets?
Thanks! ;)
Here a pseudo code of my idea:
Template:
<html>
<body>....{include:mainBox}....{include:foot}...</body>
</html>
Partials for /newAccount:
{define mainBox}
<div>New user</div>
<div>Username:<input/></div>
{define foot}
<div>...</div>
Update:
Some like this is wrong?
function IndexCtrl($scope) {
$scope.mainPage = 'partials/index/loginbox.html',
$scope.footPage = 'partials/index/footer.html',
}
After in the template I put:
<div ng-include="mainPage"></div>
...
<div ng-include="footPage"></div>
And the route:
when('/', {
templateUrl: 'partials/index/layout.html',
controller: IndexCtrl
})
Use ng-include for this. Maybe what you want is ng-view + $routeProvider