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

ref: updating title tag using angularjs , ui-router


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -