File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 11# sample-angular-material-dialog-overview
2- A basic sample showing an error received in the console when trying to show a basic md-dialog .
2+ A basic sample showing how to use the Material Dialog in a newly generated Angular app .
33
44#### error
55EXCEPTION: Cannot set property stack of [ object Object] which has only a getter
66
77If I replace the line regarding zone in package.json to: "zone.js": "0.7.2", i instead get:
88
9- EXCEPTION: Error in :0:0 caused by: The selector "app-example-dialog" did not match any elements
9+ ** EXCEPTION: Error in :0:0 caused by: The selector "app-example-dialog" did not match any elements**
1010
11+ ### solution
12+ In app.module.ts, move ExampleDialog to entryComponents, like so:
13+ ``` typescript
14+ @NgModule ({
15+ declarations: [
16+ AppComponent ,
17+ ExampleDialogComponent
18+ ],
19+ imports: [
20+ BrowserModule ,
21+ FormsModule ,
22+ HttpModule ,
23+ MaterialModule .forRoot ()
24+ ],
25+ providers: [],
26+ bootstrap: [AppComponent ],
27+ entryComponents: [ExampleDialogComponent ]
28+ })
29+ export class AppModule { }
30+ ```
1131
1232#### steps to reproduce
13331 . ` ng new my-dialog-app ` - Create app
You can’t perform that action at this time.
0 commit comments