@ngx-perimeter/strategy
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@ngx-perimeter/strategy

license

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

License

© 2019 ngx-perimeter. All Rights Reserved.

/@ngx-perimeter/strategy/

    Package Sidebar

    Install

    npm i @ngx-perimeter/strategy

    Weekly Downloads

    0

    Version

    0.0.3

    License

    none

    Unpacked Size

    132 kB

    Total Files

    29

    Last publish

    Collaborators

    • mohammedzamakhan