MJDialogService — Programmatic dialog opening.
// Simple confirmconst dialogRef = this.dialogService.Open({ title: 'Confirm', content: 'Are you sure?', actions: [ { text: 'OK', primary: true }, { text: 'Cancel' } ]});dialogRef.Result.subscribe(result => { ... });// Component contentconst dialogRef = this.dialogService.Open({ content: MyDialogComponent, width: 500});dialogRef.Content.instance.someInput = 'value';dialogRef.Result.subscribe(result => { ... }); Copy
// Simple confirmconst dialogRef = this.dialogService.Open({ title: 'Confirm', content: 'Are you sure?', actions: [ { text: 'OK', primary: true }, { text: 'Cancel' } ]});dialogRef.Result.subscribe(result => { ... });// Component contentconst dialogRef = this.dialogService.Open({ content: MyDialogComponent, width: 500});dialogRef.Content.instance.someInput = 'value';dialogRef.Result.subscribe(result => { ... });
Lowercase open alias.
open
Open a dialog programmatically.
Accepts content as a string or a Component class, returns a ref with .Content.instance and .Result observable.
content
.Content.instance
.Result
MJDialogService — Programmatic dialog opening.
Example