How to Show Dialog box insteat of alert() in ContextMenu

When I click on that node that properties will show on Material dialog box instead of alertbox.
how to add dialog variable in contextmenu function.

import { MatDialog } from ‘@angular/material/dialog’;

export class AppComponent{

constuctor(public dialog: MatDialog){}


            $(go.TextBlock, "Edit", 
            { font: "bold 16px sans-serif",textAlign:"center",width:50,height:20,margin: 8, stroke: "royalblue"}
            { click: function(e, obj){   } } // How to use dialog variable here inside function



When you get a reference to the dialog, you can keep it for later use. Just make sure the variable is in the scope of the code where you want to use it.

Are you actually getting a reference in the App Component constructor? That seems unlikely.

This is really an Angular question not involving GoJS. Please search the web for suggestions on how to organize your app.