Warning when building with AOT for NgbModalRef referring to Angular 5.x
See original GitHub issueBug description:
When building with AOT, I’m getting a warning, not an error though.
[ERROR] 11% building modules 14/14 modules 0 activeWarning:
Can't resolve all parameters for NgbModalRef in
/home/projects/angular-app/node_modules/@ng-bootstrap/ng-bootstrap/modal/modal-ref.d.ts:
([object Object], [object Object], [object Object], ?).
This will become an error in Angular v5.x
The build went through and no problem as for now but I forsee this will be when Angular move to v5.x
Version of Angular, ng-bootstrap, and Bootstrap:
Angular: 4.3.6
ng-bootstrap: 1.0.0-beta.3
Bootstrap: 4
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Developers - Warning, will become error in Angular 5.x -
Warning, will become error in Angular 5.x. ... During angular-cli AOT build process: ... Warning: Can't resolve all parameters for NgbModalRef in ...
Read more >Warning when building an Angular app with Ahead-of-time ...
Something to look into: I think that the build process uses AOT by default. You may want to look into seeing if there...
Read more >angular/angular - Gitter
its build for enterprise large scale angular application builds ... I only get those warnings with the CLI builds but otherwise no errors...
Read more >Angular2 Final: es2015.core.d.ts:17:14: Duplicate identifier ...
Coding example for the question Angular2 Final: es2015.core.d.ts:17:14: Duplicate identifier 'PropertyKey'-angular.js.
Read more >Ngbmodel Error Typeerror: "This._Modalstack Is Undefined"
Because the components and templates provided by Angular cannot be the type of compilation JIT or AOT depends on the value of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m facing this issue as an error on angular 4.4.3 while using the same 1.0.0-beta.5
I worked around this error by removing the reference to
NgbModalRef
from theNgModule
and usingany
as shown below.modal:any;
showModal(){
this.modal = this.modalService.open(content);
}
closeModal(){
this.modal.close();
}
FYI, just tried version: 1.0.0-beta.5, problem is fixed.