@ycjs/core
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @ycjs/core

Weekly Downloads

0

Version

1.2.0

License

MIT

Last publish

Collaborators

  • kuyoonjo