@amitgroup/toggle-switch
v0.0.3
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
Downloads
12
Readme
ToggleSwitch
This library was generated with Angular CLI version 13.2.0.
How to use
Step 1
Import ToggleSwitchModule to AppModule
{
imports: [
...
ToggleSwitchModule
...
]
}
or
{
imports: [
...
ToggleSwitchModule.forRoot(options)
...
]
}
Step 2
Add am-toggle-switch
tag in component as HTML tag with 2 options [(ngModel)] or formControlName
<am-toggle-switch [(ngModel)]="test" (ngModelChange)="onInputChange($event)"></am-toggle-switch>
or
<form [formGroup]="formGroup">
<am-toggle-switch formControlName="test"></am-toggle-switch>
</form>
Inputs
| Input | Type | Default | | --------------- | ---------------- | ---------------- | [disabled] | boolean | false | | formControlName | formControlName | |