Ohhh… I find a problem that the pages do not have titles(just display as URL), when I play the demo in AngularJS Start with Yeoman, Grunt and Bower. ###Intuitively, the page title should be changed dynamically with routers’ changing.
I get my solution in this stackoverflow page.
You can find my repository in GitHub: AngularJS-Demo-Code
1. Open app/index.html
:
1 | <title ng-bind="title"></title> |
Note: why use ng-bind
?
1 | // from https://coderwall.com/p/vcfo4q |
2. Change app.js
as below:
1 | ; |