angular-component-router-active
v0.0.6
Published
routerActive directive for angular 1.5 component router
Downloads
23
Maintainers
Readme
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