Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // itemview typescript
- // functions popup
- functionsListDataSource : object[] = [{"listName":"exampleFuntionName"}];
- popupListFunctionsVisible : boolean = false ;
- onFunctionBtnClick(){
- this.popupListFunctionsVisible = true;
- }
- onFunctionsListSelectItem(e){
- let funcName : string = e.itemData.listName ;
- switch(funcName){
- case "exampleFuntionName":
- this.exampleFuntion();
- break;
- }
- }
- exampleFuntion(){
- var result = confirm("Are you sure you want to execute function?", "Confirm execute");
- result.then((dialogResult) => {
- if(dialogResult){
- // to do when confirm
- }
- });
- }
- // itemview html
- <app-list-with-search-bar
- [dataSource]="functionsListDataSource"
- (selectItem)="onFunctionsListSelectItem($event)"
- [(popupVisible)]="popupListFunctionsVisible">
- </app-list-with-search-bar>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement