All of our content pages have a particular header, X-Foo
. When the content of the ng-view
changes, we want to display the new page's X-Foo
header in a different element. How can we get this value whenever the content changes?
EDIT: Since this was apparently unclear, the header is expected in the response, not the request.
ngView
has a$viewContentLoaded
event that you could hook onto. Alternatively there's the$routeChangeSuccess
event if you'd like to hook into when the route changes. – Rhpositive