AngularJS Nav Menu

We will create a navigation bar menu using a directive based in thin directive concept. The main idea involved is that the directive can check which item is being accessed using the information passed by the URL in real time. Three files have to be created, which work directly with this directive.

  • Navbar.html - This is the basic template which contains the information and values to be updated.
  • navbar-ctrl.js - This is the controller for our nav menu. This makes the controller work perfectly.
  • navbar.js - This is our directive for the app. With just a few simple settings, this is extremely compact.

Next ConceptSwitch Menu