import { Component, Injector, OnInit, ViewChild, ViewEncapsulation, Input, EventEmitter, Output } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { AppConsts } from '@shared/AppConsts'; import { appModuleAnimation } from '@shared/animations/routerTransition'; import { AppComponentBase } from '@shared/common/app-component-base'; import { RouteListDto, RouteServiceProxy } from '@shared/service-proxies/service-proxies'; import * as moment from 'moment'; import { LazyLoadEvent } from 'primeng/components/common/lazyloadevent'; import { Paginator } from 'primeng/components/paginator/paginator'; import { Table } from 'primeng/components/table/table'; import { HttpClient } from '@angular/common/http'; import { finalize } from 'rxjs/operators'; @Component({ selector: 'checkbox', templateUrl: './checkbox.component.html', encapsulation: ViewEncapsulation.None, styleUrls: ['./checkbox.component.less'], animations: [appModuleAnimation()] }) export class CheckBoxComponent extends AppComponentBase implements OnInit { hide : boolean; @Input('value') value: string; @Input('selected') selected: number; @Input('idname') idname: string; @Output() result = new EventEmitter(); status_value: any; constructor( injector: Injector, private _routeService: RouteServiceProxy ) { super(injector); } ngOnInit(): void { } tickBox(): void { if(this.selected){ this.selected = 0; } else { this.selected = 1; } this.result.emit({'selected': this.selected, 'value': 'this.value'}); } }