Want to set page title with emberjs? A few issues came up with using navigateTo, this ended up being more reliable and cleaner for my situation at least.
1 2 3 4 5 6 7 8 9 10 11 12 | Ember.Route.reopen({ enter: function(router) { this._super(router) # Set page title name = this.parentState.get('name') if (!Em.none(name)) { capitalizedName = name.charAt(0).toUpperCase() + name.slice(1) $(document).attr('title', "Website - " + capitalizedName) } } }) |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.