Last active
January 19, 2022 15:01
-
-
Save Bilkiss/2b34ff83ed918af9de533491fc0a3c62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button (click)=”deleteItem()”>Delete item</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { Confirmable } from '../decorators/confirmable.decorator'; | |
@Component({ | |
selector: 'app-item', | |
templateUrl: ‘./item.component.html', | |
styleUrls: ['./item.component.scss'] | |
}) | |
export class ItemComponent implements OnInit { | |
constructor() {} | |
ngOnInit(): void {} | |
@Confirmable({ title: 'Are you sure', html: 'Do you want to delete this item?’, icon: 'warning'}) | |
deleteItem(): void { | |
//Code to delete your item | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment