AngularJS module inside "root module" -


is there way define angular module inside module ? have template in web application called every page of application. in template definition set ng-app. ng-app can declare modules need in pages of application (or every page). there modules want add on specific pages. problem in pages have ng-app of template.

so there way keep ng-app kind of root ng-app declared modules need everywhere , add specific modules inside specific pages ?

that means possible this:

 <div ng-app="rootapp">       <div ng-app="specificapp">          ...        </div>  </div> 

the rootapp contains module declared in template, use in pages, , specifiapp contains modules need in 1 specific page.

thanks !

[edit] bootstrap attempt:

 var reportholidaysbyemployeeapp = angular.module('reportholidaysbyemployeeapp', ['fitnetapp', 'ui.bootstrap']);  angular.bootstrap(document.getelementbyid("reportholidaysbyemployeeapp"), ['reportholidaysbyemployeeapp']);   reportholidaysbyemployeeapp.controller('reportholidaysbyemployeectrl', function($scope, $filter, $timeout) { 

fitnetapp global module load on html tag in every page

only 1 angularjs application can auto-bootstrapped per html document. first ngapp found in document used define root element auto-bootstrap application. run multiple applications in html document must manually bootstrap them using angular.bootstrap instead. angularjs applications cannot nested within each other. -- http://docs.angularjs.org/api/ng.directive:ngapp

see also

https://groups.google.com/d/msg/angular/lhbrig5abx4/4hynzq2egzwj http://docs.angularjs.org/api/angular.bootstrap


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -