Skip to content

Instantly share code, notes, and snippets.

@xantiagoma
Last active January 15, 2019 14:39
Show Gist options
  • Save xantiagoma/ab72aa114d20cae054ef4e764b60d4f8 to your computer and use it in GitHub Desktop.
Save xantiagoma/ab72aa114d20cae054ef4e764b60d4f8 to your computer and use it in GitHub Desktop.
DialogTestModule
import { NgModule } from '@angular/core';
import { MatDialogModule } from '@angular/material';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { OverlayContainer } from '@angular/cdk/overlay';
export const TEST_DIRECTIVES = [
Components, Pipes
];
@NgModule({
imports: [MatDialogModule, NoopAnimationsModule],
exports: TEST_DIRECTIVES,
declarations: TEST_DIRECTIVES,
entryComponents: [
entryComponents
],
providers: [{ provide: OverlayContainer, useFactory: () => {
const overlayContainerElement = document.createElement('div');
return { getContainerElement: () => overlayContainerElement };
}}]
})
export class DialogTestModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment