npm install axiom-toggle
import { AxiomToggleModule } from 'axiom-toggle';
...
@NgModule({
imports: [
BrowserModule,
AxiomToggleModule,
],
declarations: [
AppComponent
],
bootstrap: [AppComponent]
})
...
Use ngModel
<ax-toggle [(ngModel)]="model"
axMode="round"
axColor="indigo">
</ax-toggle>
Use ReactiveFroms
<ax-toggle formControlName="model"
axMode="round"
axColor="indigo">
</ax-toggle>
Name | Usage |
---|---|
axMode | round,flat (default=flat) |
axColor | purple,indigo,pink,red,cyan,green,yellow,amber,orange,brown |
Name | Usage |
---|---|
ngModelChange | Model's change default event |