0.0.2 • Published 4 years ago
ngx-switch2 v0.0.2
Ngx UI Switch Component
Description
This is an UI switch component for Angular.
Installation
npm: npm install ngx-switch2 --save
Usage
- Import into a module (
AppModule
example below)
// app.module.ts
import { NgxSwitch2Module } from 'ngx-switch2';
import { AppComponent } from './app.component';
@NgModule({
imports: [BrowserModule, NgxSwitch2Module],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
<ngx-switch2></ngx-switch2>
Params
id
inputId: string
default: switch2
<ngx-switch2 inputId="myId"></ngx-switch2>
<ngx-switch2 [inputId]="myVariable"></ngx-switch2>
name
inputName: string
default: switch2
<ngx-switch2 inputName="myName"></ngx-switch2>
<ngx-switch2 [inputName]="myVariable"></ngx-switch2>