1.0.0 • Published 8 years ago
@yci/custom-url-scheme v1.0.0
@yci/custom-url-scheme
Installation
- Install the Ionic plugin
npm i -S @yci/custom-url-scheme
Install the cordova plugin written by EddyVerbruggen
Add it to your app’s NgModule.
// Import your library
import { CustomUrlSchemeModule } from '@yci/custom-url-scheme';
@NgModule({
...
imports: [
...
// Specify your library as an import
CustomUrlSchemeModule.forRoot()
],
...
})
export class AppModule { }
Usage
Once your library is imported, you can use its service in your Angular application:
import { CustomUrlScheme } from '@yci/custom-url-scheme';
// ...
constructor(public cus: CustomUrlScheme) {
cus.add('myScheme')
.subscribe(x => {
console.log(x);
});
}
// ...
Methods
public add(urlScheme: string): Subject<IUrlScheme>;
Interfaces
interface IUrlScheme {
scheme: string;
path: string;
query: {
[x: string]: string;
};
}
Development
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
License
MIT © Yu Chen
1.0.0
8 years ago