import { Component , EventEmitter , HostBinding , Input , OnInit , Output } from '@angular/core' ; @ Component ( { selector : 'gt-checkbox' , template : `
    <label class="custom-control custom-checkbox p-0" (click)="$event.stopPropagation()">
      <input #checkbox type="checkbox" class="custom-control-input" [(checked)]="checked" (change)="toggle($event);">
      <span class="custom-control-label"></span>
    </label>
  ` , styles : [ ] } ) export class GtCheckboxComponent implements OnInit { get initialValue ( ) : boolean { return this . _initialValue ; } @ HostBinding ( 'class' ) class = 'd-flex justify-content-end' ; @ Input ( ) set initialValue ( value ) { this . _initialValue = value ; } get checked ( ) : boolean { return this . _checked ; } @ Input ( ) set checked ( value ) { this . _checked = value ; } private _checked : boolean ; private _initialValue : boolean ; @ Output ( ) changed : EventEmitter < boolean > = new EventEmitter ( ) ; constructor ( ) { } ngOnInit ( ) { } toggle ( checked ) { this . changed . emit ( this . checked ) ; } }