NbDialogService does not render a Dialog (No component factory found error)
- Linguagem predominante
- TypeScript
- Estrelas
- 25.7k
- Forks
- 7.9k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### Issue type
**I'm submitting a ...** (check one with "x")
* [x] bug report
* [ ] feature request
* [ ] question about the decisions made in the repository
### Issue description
**Current behavior:**
Click on the button to open the dialog and console says:
```Error: No component factory found for undefined. Did you add it to @NgModule.entryComponents?```
**Expected behavior:**
When i click x button, its shows the dialog fine.
**Steps to reproduce:**
From a working Nebular project, import NbDialogService, then in appModule.ts reference to use forRoot() as the docs says.
Then in the x component, import NbDialogService, insert into constructor to use it and declare the function to open the dialog.
**Related code:**
Template (inside a card header):
```
New profile pic
Template Dialog
{{ data }}
Close Dialog
```
Component:
```
open(dialog: TemplateRef) {
this.dialogService.open(dialog, { context: 'this is some additional data passed to dialog' });
}
```
### Other information:
Node v13.11.0
Npm 6.14.3
**Angular, Nebular**
``` "dependencies": {
"@angular/animations": "~8.0.0",
"@angular/cdk": "^8.0.0",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"@auth0/angular-jwt": "^4.0.0",
"@nebular/auth": "^4.6.0",
"@nebular/eva-icons": "4.6.0",
"@nebular/theme": "^4.6.0",
"eva-icons": "^1.1.2",
"rxjs": "~6.4.0",
"s": "^1.0.0",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "~8.0.2",
"@angular/compiler-cli": "~8.0.0",
"@angular/language-service": "~8.0.0",
"@schematics/angular": "~8.0.2",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
}
}```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.