In AngularJS, can I use current route in ngSwitch outside of ngView

前端 未结 4 1968
日久生厌
日久生厌 2021-01-12 18:42

I am trying to change the page header depending on current view. The header is outside of ngView. Is that possible or do I need to put the header inside the view?

My

4条回答
  •  一整个雨季
    2021-01-12 19:28

    Seems as it will be different controllers for header and content. Best way for communication between controllers is service. Another way - events. See Vojta answer.

提交回复
热议问题