|
//Accessing the Dialog componenent's instance
@ViewChild('ejDialog') ejDialog: DialogComponent;
public someEvent = function(event: any): void {
// Call the show method to open the Dialog
this.ejDialog.show(true);
} |
|
[app.service.ts]
import { Component, Injectable } from '@angular/core';
@Injectable()
// create the sepearate sevice for dialog
export class ShareRouting {
public dialogContent: string;
constructor() {
// setting the default value
this.dialogContent = '';
}
setData(data) {
this.dialogContent = data;
}
getData() {
return this.dialogContent;
}
}
|