javascript - Page title in ui routing -
i using ui route. want set page title if title static or hard code, it's working fine want set page title based on dynamic state. here code:
.state('sportsbrief', { url: '/sportsbrief', controller: 'homecontroller home', templateurl: html.sports_brief, title:"sportsbrief" }) .state('page',{ url:'/page/:page', templateurl:function(value){ return"views/"+value.page+".html" }, controller:"staticpagecontroller", title:value.page })
i want set page title state page.
you can use angular-ui-router-title in app allows dynamic title update. https://github.com/nonplus/angular-ui-router-title
Comments
Post a Comment