import { Component, OnInit, OnDestroy } from '@angular/core'; @Component({ selector: 'cm-button-doc-5', templateUrl: './button-doc-5.component.html', styleUrls: ['./button-doc-5.component.css'] }) export class ButtonDoc5Component implements OnInit, OnDestroy { isLoadingOne = false; isLoadingTwo = false; loadOne = (value: any) => { this.isLoadingOne = true; setTimeout(_ => { this.isLoadingOne = false; }, 5000); }; loadTwo = (value: any) => { this.isLoadingTwo = true; setTimeout(_ => { this.isLoadingTwo = false; }, 5000); }; constructor() { } ngOnInit() { } ngOnDestroy(){ } }