angularjs - ui-router: update parent from a child -


i have question ui-router , architecture.

what best way update parent template or this?

if have 2 states:

$stateprovider   .state('layout', {     controller: 'layoutctrl layout',     templateurl: 'app/layout/templates/layout.html'   })   .state('layout.page', {     controller: 'pagecontroller page',     templateurl: 'app/page/templates/page.html'   }); 

and template layout.html:

<header>    <h2>{{ layout.title }}</h2> </header> <ui-view></ui-view> <footer>     <!-- content --> </footer> 

how can set page title (layout.title) ?

or have problem specific page. on page have fixed layout header. how can make fixed layout header? have directive named sticky, best way tell parent state set directive header?

i'm using $scope.$emit , $scope.$on i'm not sure correct way. thank you.

i use $rootscope attribute handle page title , modify in underlying controllers.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -