Have ideas to improve npm?Join in the discussion! »

@yca/apiTypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Build Status Coverage Status MIT license

@yca/api

Installation

  1. Install the Ionic plugin
 npm i -S @yca/api
  1. 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 apiApi) {
  api.root // get the root url
}

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

License

MIT © Yu Chen

Keywords

Install

npm i @yca/api

DownloadsWeekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • avatar