Skip to content

Instantly share code, notes, and snippets.

@Ze1598
Created November 22, 2019 20:54
Show Gist options
  • Save Ze1598/942b30b6a3feb34b028e698c27a2d8e2 to your computer and use it in GitHub Desktop.
Save Ze1598/942b30b6a3feb34b028e698c27a2d8e2 to your computer and use it in GitHub Desktop.
Modal component: app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { ModalComponent as ModalComponent } from './modal/modal.component';
// https://stackoverflow.com/questions/47240838/matdialog-not-displayed-correctly
@NgModule({
declarations: [
AppComponent,
ModalComponent
],
imports: [
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
MatButtonModule,
MatDialogModule
],
providers: [],
bootstrap: [AppComponent],
entryComponents: [ModalComponent]
})
export class AppModule {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment