0.0.1 • Published 3 years ago

webpixel v0.0.1

Weekly downloads
4
License
-
Repository
-
Last release
3 years ago

Quick start

Installation

To install this library, run:

$ npm install cidaas-webpixel-sdk --save

Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install cidaas-webpixel-sdk

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { AppComponent } from './app.component';

// Import your library
import { CaptchModule } from 'cidaas-webpixel-sdk';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    CaptchModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its components, directives and pipes in your Angular application:

Consuming Captcha Service

Once your library is imported, you can use its service in your component directly.

import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
// Import the shred service
import { CaptchaService } from 'cidaas-webpixel-sdk';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {

  constructor(private captchaService: CaptchaService) {}

  ngOnInit() {
    this.captchaService.setBaseUrl('Place Your URL');
    this.captchaService.setToken('Place Your Bearer Token');
  }

  // Your Implementation

}

Developer

This library was generated with Angular CLI version 9.0.7.

Code scaffolding

Run ng generate component component-name --project webpixel to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project webpixel.

Note: Don't forget to add --project webpixel or else it will be added to the default project in your angular.json file.

Build

Run ng build webpixel to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build webpixel, go to the dist folder cd dist/webpixel and run npm publish.

Running unit tests

Run ng test webpixel to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Author

Nidhin Vincent

0.0.1

3 years ago