1.2.0 • Published 8 years ago

@ycjs/core v1.2.0

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

core

Build Status codecov npm version devDependency Status GitHub issues GitHub stars GitHub license

Table of contents

About

Installation

Install through npm:

npm install --save @ycjs/core

Install through yarn:

yarn add @ycjs/core

Then include in your apps module:

import { Component, NgModule } from '@angular/core';
import { YcjsAPIModule } from '@ycjs/core';

const apiRoot: string = 'http://www.example.com';

@NgModule({
  imports: [
    YcjsAPIModule.forRoot(apiRoot)
  ]
})
export class MyModule {}

Finally use in one of your apps components:

import { Component } from '@angular/core';
import { YcjsAPI, YcjsRequest } from '@ycjs/core';

@Component({
  template: '<hello-world></hello-world>'
})
export class MyComponent {
  constructor(public api: YcjsAPI) { }

  loadData(): Promise<any> {
    return YcjsRequest('GET', `${api.root}/api/examples`);
  }
}

Usage without a module bundler

<script src="node_modules/@ycjs/core/bundles/@ycjs/core.umd.js"></script>
<script>
    // everything is exported ycjsCore namespace
</script>

Documentation

All documentation is auto-generated from the source via compodoc and can be viewed here: https://kuyoonjo.github.io/ycjs-core/docs/

License

MIT

1.2.0

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.1

8 years ago