Files
psp_panel/src/app/components/button/button.component.ts
T

28 lines
712 B
TypeScript
Raw Normal View History

2021-12-09 17:24:42 +03:00
import {Component, OnInit} from '@angular/core';
import {MenuItem} from 'primeng/api';
@Component({
2021-12-28 13:29:25 +03:00
templateUrl: './button.component.html'
2021-12-09 17:24:42 +03:00
})
2021-12-28 13:29:25 +03:00
export class ButtonComponent implements OnInit {
2021-12-09 17:24:42 +03:00
items: MenuItem[];
2021-12-24 16:44:50 +03:00
loading = [false, false, false, false]
2021-12-09 17:24:42 +03:00
ngOnInit() {
this.items = [
{label: 'Update', icon: 'pi pi-refresh'},
{label: 'Delete', icon: 'pi pi-times'},
{label: 'Angular.io', icon: 'pi pi-info', url: 'http://angular.io'},
{separator: true},
{label: 'Setup', icon: 'pi pi-cog'}
];
}
2021-12-24 16:44:50 +03:00
load(index) {
this.loading[index] = true;
setTimeout(() => this.loading[index] = false, 1000);
}
2021-12-09 17:24:42 +03:00
}