I have 2 list of items say, news and people.
These 2 lists have different logic and are located in different pages, so don't share shame ng-app
:
<!-- News.html -->
<div id="newsList" ng-app="newsListApp">
<div id="{{news.id}}" ng-app="modalApp" ng-repeat="news in newsList">
...
</div>
</div>
<!-- People.html -->
<div id="peopleList" ng-app="peopleListApp">
<div id="{{person.id}}" ng-app="modalApp" ng-repeat="person in people">
...
</div>
</div>
I need to open each item in a modal popup, so I have to use a modalApp
, but I want to use the same modalApp
(that will use the same popup template) in the news
and people
lists...
What is the concept of sharing angular application/modules in cases like this?