Change text in the header according to the open page

Asked

Viewed 85 times

0

I need to change the header text every time I switch pages. Could someone help me??/

  • What you already own?

  • controllers and pages

  • Could you include the relevant snippets of the code? With header, do you mean the title of the page? Or some element that is used as header?

  • I have a header text on each page, I would like that text to appear in the header. Every time you open a page the header shows the text related to it. Since the header is the same for all pages, I wanted to do this dynamically via Angularjs

  • Post what you already have there, as is your header and your angular app

1 answer

1


You can use $window.document.title = "seuTituloAqui"; within a function called when loading that view, for example using ng-init

Browser other questions tagged

You are not signed in. Login or sign up in order to post.