@ngx-perimeter/strategy
v0.0.3
Published
[![license](https://img.shields.io/github/license/mohammedzamakhan/ngx-loadable.svg)](https://github.com/mohammedzamakhan/ngx-perimeter/blob/master/LICENSE)
Downloads
3
Readme
@ngx-perimeter/strategy
Table of Contents
Install
Install and manage the ngx-perimeter using NPM. You may use yarn
or npm
.
npm install @ngx-perimeter/strategy --save
or
yarn add @ngx-perimeter/strategy
Usage
NgModule
Import the PerimeterModule in the NgModule and declare them in the "imports".
- Step 1:
import { PerimeterStrategyModule } from '@ngx-perimeter/strategy';
@NgModule({
imports: [
PerimeterStrategyModule
]
})
- Step 2:
import { PerimeterStrategy } from '@ngx-perimeter/strategy';
@NgModule({
imports: [RouterModule.forRoot(routes, {
preloadingStrategy: PerimeterStrategy
})],
providers: [PerimeterStrategy],
exports: [RouterModule]
})
export class AppRoutingModule { }
- Step 3:
Use the
ngxPerimeterRoute
directive aling with routerLink and ngxPerimeter
<button
[routerLink]="['about-us']"
ngxPerimeterRoute
ngxPerimeter
padding="50"
(breach)="onBreach()"
>
Button
</button>
Contribute
Please contribute by creating issues/PRs