angularjs - Add Controller outside of View -


i using requirejs alongside angularjs , want give body controller.

the important elements nav , .container.

now, .container changes automatically route, want give navigation controller can change current active tab. don't understand, however, how give nav controller static element , isn't loaded alongside route , loaded before async scripts (angular, etc...) have loaded, can't use ng-controller directive.

if you're using ui-router, create abstract state under exists app. clarify, nav still part of app, primary application sit underneath ui-view directive.

edit can read abstract states on documentation page. bonus, if use controlleras, child controller prototypical inherit properties of parent. keeps application scope open, nice , clean.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -