toggle means: it has two states, which can be toggled between the two states

Tags:

OffisOn? false
No documentation yet

Authors:Zhicheng Wang

<span *ngIf="toggle.isOn" (click)="toggle.turnOff()" class="custom-button">
  <i class="fa fa-toggle-on"></i>
  <span i18n>On</span>
</span>

<span *ngIf="toggle.isOff" class="custom-button" (click)="toggle.turnOn()">
  <i class="fa fa-toggle-off"></i>
  <span i18n>Off</span>
</span>

<span class="btn" [class.btn-primary]="toggle.isOn" (click)="toggle.toggle()">
  <span i18n>isOn?</span>
  {{toggle.isOn}}
</span>