ng2-slide-toggle
v1.1.3
Published
This is a slide toggle switch with dynamic color and text depending on the state.
Downloads
159
Readme
ng2-slide-toggle
This is a slide toggle switch with dynamic color and text depending on the state.
Usage
npm install --save ng2-slide-toggle
import { SlideToggleModule } from 'ng2-slide-toggle';
@NgModule({
...
imports: [
...
SlideToggleModule,
...
],
...
})
<slide-toggle></slide-toggle>
@Input() and @Output() with defaults
@Input() onText = 'ON';
@Input() offText = 'OFF';
@Input() onColor = '#0088cc';
@Input() value = false;
@Output() valueChange = new EventEmitter<boolean>();