How to implement a navigation bar in angularjs -


starting angularjs newbie have created navigation bar. has several sub menus. not sure best practice deal using angularjs. keep track of current selected menu item make 'active' , change rendered template depending on selection.

i looking examples or example code, can used in production environment.

sorry generic question, hope can me.

have @ angular-ui/ui-router. adds named views , states app. can define "areas" in main template that, based on "state" app in, display template+controller.

edit: yes, $location enough simple application time one-per-screen controller gets 100 lines of $scope.$watch definitions start realizing need more.