-
-
Save zimejin/1e3cef31de09f7f740b06f176217ad38 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 hidden or 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