1.0.1 • Published 5 years ago

ngx-path-to-regexp v1.0.1

Weekly downloads
16
License
-
Repository
-
Last release
5 years ago

What

Turn a path string such as /user/:name into a regular expression

Where from

https://github.com/pillarjs/path-to-regexp

NgxPathToRegexp

https://github.com/ferried/NgxPathToRegexp

How To Use

npm install ngx-path-to-regexp@latest
import { Component } from '@angular/core';
import { PathToRegexpService } from 'ngx-path-to-regexp';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less']
})
export class AppComponent {
  constructor(private ngxPathToRegepx: PathToRegexpService) {
    console.log(ngxPathToRegepx.pathToRegexp('/user/:id/:name', null, null));
  }
}
1.0.1

5 years ago

1.0.0

5 years ago

0.0.1

5 years ago