Skip to content

Wapweb/angular-component-router-active

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-component-router-active

routerActive directive for angular 1.5 component router

Install

$ npm install angular-component-router-active --save

Usage

1.Add module to your app

angular.module('app', ['wapweb.componentRouterActive']);

If you use es6:

import angularComponentRouterActive from 'angular-component-router-active';
angular.module('app', [angularComponentRouterActive]);

2.Add router-active directive to your template

<ul>
    <li router-active="active">
        <div>
            <a ng-link="['Test']">Test component</a>
        </div>
    </li>
    <li>
        <a router-active="active" ng-link="['Other']">Other component</a>
    </li>
</ul>

##Demo There is a simple demo on Plnkr

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published