yca-api
v1.0.0
Published
[![Build Status](https://travis-ci.org/yc-angular/api.svg?branch=master)](https://travis-ci.org/yc-angular/api.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/yc-angular/api/badge.svg?branch=master)](https://coveralls.io/github/yc
Downloads
1
Readme
@yca/api
Installation
- Install the Ionic plugin
npm i -S @yca/api
- Add it to your app’s NgModule.
// Import your library
import { ApiModule } from '@yca/api';
@NgModule({
...
imports: [
...
// Specify your library as an import
ApiModule.forRoot('http://localhost')
],
...
})
export class AppModule { }
Usage
Once your library is imported, you can use its service in your Angular application:
import { Api } from '@yca/api';
constructor(public api: Api) {
api.root // get the root url
}
Development
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
License
MIT © Yu Chen