1.0.0 • Published 8 years ago

@yci/custom-url-scheme v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Build Status Coverage Status MIT license

@yci/custom-url-scheme

Installation

  1. Install the Ionic plugin
 npm i -S @yci/custom-url-scheme
  1. Install the cordova plugin written by EddyVerbruggen

    https://github.com/EddyVerbruggen/Custom-URL-scheme

  2. 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