1.0.1 • Published 6 years ago
ngx-lib-nfq-button v1.0.1
NgxLibNfqButton
- A simple
componentlibrary to be used with Angular. - This component extends the funtionality of Angular
web-componentsand is recommended that it is used with it. - However, this component can be used inside
any othercomponent. - It is developed using
Angular >=8.0.0and itsng g libraryschematics.
Examples/Demo
- A simple Example can be found under
src/appdirectory of this repository. It usesjson-serverto have a url and filter functionality.
Installation
npm i ngx-lib-nfq-button
API
import { ButtonModule } from 'ngx-lib-nfq-button';
selector: ui-button
@Inputs()
| Input | Type | Required | Description |
|---|---|---|---|
| text | string | YES | the text to be displayed inside the button. |
| disabled | boolean | Optional, default: false | if true, it disables the button |
Usage
1) Register the ButtonModule in your app module.
import { ButtonModule } from 'ngx-lib-nfq-button'
import { NgModule } from '@angular/core';
import { ButtonModule } from 'ngx-mat-typeahead';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [
ButtonModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {} 2) Use the selector inside any component html file <ui-buton><ui-button> in your component.
Running the example in local env inside your project
npm i- Run
ng servefor a dev server and running the demo app. Navigate tohttp://localhost:4200/. The app will automatically reload if you change any of the source files. - The demo app uses
json-servermodule for enabling the url and filter funtionality.