K
K
kid-programmer2014-08-12 01:32:24
JavaScript
kid-programmer, 2014-08-12 01:32:24

How to change title and meta tags in head in AngularJS?

How to correctly change the head (title, meta) area on a one-page site through the controller. Interested in the right way, angular way, best practice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-08-12
@kid-programmer

ng-bind and rootScope.
Well, yes, in general it is better to do such things in views and not in the controller. Like this:

<!-- directive:page-title post.title + " | Some other string" -->

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question