Angular-ui-router: ui-sref-active and nested states

前端 未结 8 1064
独厮守ぢ
独厮守ぢ 2020-12-02 10:06

I am using angular-ui-router and nested states in my application, and I also have a navigation bar. The nav bar is hand written, and uses ui-sref-active to high

8条回答
  •  青春惊慌失措
    2020-12-02 11:04

    UI router. Code snippet to make your navigation bar active.

    HTML

  • Courses
  • blog
  • CSS

    is-active{
          background-color: rgb(28,153,218);
    }
    

    Inside courseView.HTML

    
    

    This button is present inside course View which navigate you to next View i.e blog. and makes your navigation bar highlighted.

    find similar example, a demo angular ui-router app: https://github.com/vineetsagar7/Angualr-UI-Router

提交回复
热议问题