I have the following question: I'm setting up a page, where I have a controller called PageController
, responsible for rendering the menu and title of the page.
However, within div
where I use ng-controller="PageController"
, I need to set where the page will be rendered - I'm using angular-route
. So, theoretically, I would have one controller inside the other.
So, I have something similar to this structure:
<div ng-controller='PageController'>
<h1 ng-bind="title"></h1>
<ul>
<li ng-repeat="url in urls"></li>
</ul>
<!-- aqui o angular vai executar outro controller, por causa do $routeProvider -->
<div ng-view></div>
</div>
My question is:
-
Does this flush with the standards recommended by AngularJS?
-
Can this be a problem?