Skip to content

Dynamic navbar links

JayChase edited this page Oct 18, 2014 · 1 revision

Add the property showNav to a route with the value set to the name you want to give the link to show it as a link in the navbar.

$routeProvider.when('/features', {
            templateUrl: 'app/content/features/features.html',
            controller: 'featuresCtrl',
            caseInsensitiveMatch: true,
            showNav: 'features'
        });

To get the links call getLinks on the navigationSvc.

The skNavLinks directive displays a list of the links. It also listens to the $routeChangeSuccess $rootscope event for any route changes and sets the active link accordingly.

Clone this wiki locally