My Dialog in Material ui Angular don't function
I tried to use dialog from material UI, the problem is the alert don't recognize material classes. Is like to don't import the material UI, mat-button, mat-dialog-close and others don't function. Only the angular flex-layout it's ok.

I copied the code from this example: Example dialog
Code in my TS:
import { Component } from '@angular/core';
import {MatDialog} from '@angular/material/dialog';
@Component({
selector: 'app-norma-adscripcion',
templateUrl: './norma-adscripcion.component.html',
styleUrls: ['./norma-adscripcion.component.css']
})
export class NormaAdscripcionComponent {
//DIALOG ALERT
constructor(public dialog: MatDialog) {}
openDialog() {
this.dialog.open(NormaAdscripcionDialogComponent);
}
}
@Component({
selector: 'app-norma-adscripcion-dialog',
templateUrl: './norma-adscripcion-dialog.component.html',
})
export class NormaAdscripcionDialogComponent {}
Code in norma-adscripcion.component.html:
<div fxLayout="column" class="mx-3">
<h1>Cambio Adscripcion (Norma)</h1>
<button mat-raised-button color="primary" mat-button (click)="openDialog()">EXIT</button>
</div>
Comments
Post a Comment