[](https://travis-ci.org/yc-ionic/custom-url-scheme.svg?branch=master) [


1. Install the Ionic plugin
```
npm i -S @yci/custom-url-scheme
2. Install the cordova plugin written by EddyVerbruggen
> https://github.com/EddyVerbruggen/Custom-URL-scheme
3. Add it to your app’s NgModule.
`typescript
// Import your library
import { CustomUrlSchemeModule } from '@yci/custom-url-scheme';
@NgModule({
...
imports: [
...
// Specify your library as an import
CustomUrlSchemeModule.forRoot()
],
...
})
export class AppModule { }
`
`ts
import { CustomUrlScheme } from '@yci/custom-url-scheme';
// ...
constructor(public cus: CustomUrlScheme) {
cus.add('myScheme')
.subscribe(x => {
console.log(x);
});
}
// ...
`
ts
public add(urlScheme: string): Subject;
`Interfaces
`ts
interface IUrlScheme {
scheme: string;
path: string;
query: {
[x: string]: string;
};
}
`Development
To generate all
.js, .d.ts and *.metadata.json files:`bash
$ npm run build
``MIT © Yu Chen