mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
Additions/55 back button navigation (#1016)
feat: new angular back button navigation challenge
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<button mat-raised-button (click)="openDialog()">Open simple dialog</button>
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { DialogComponent } from '../dialog/dialog.component';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [MatButtonModule],
|
||||
selector: 'app-simple-action',
|
||||
templateUrl: './simple-action.component.html',
|
||||
})
|
||||
export class SimpleActionComponent {
|
||||
readonly #dialog = inject(MatDialog);
|
||||
|
||||
openDialog(): void {
|
||||
this.#dialog.open(DialogComponent, {
|
||||
width: '250px',
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user