Topic: Can't resolve all parameters for ModalDirective (JHipster)
Vlad Herescu asked 4 years ago
Problem
I Have created an application from scratch using jHipster and Angular. Everything works fine. After this I tried to integrate mdboostrap intro this project. However I get an error at runtime(when running the front-end only) with this text:
compiler.js?d6e4:2387 Uncaught Error: Can't resolve all parameters for ModalDirective: ([object Object], ?, [object Object], [object Object], [object Object]). at syntaxError (compiler.js?d6e4:2387) at CompileMetadataResolver._getDependenciesMetadata (compiler.js?d6e4:22001) at CompileMetadataResolver._getTypeMetadata (compiler.js?d6e4:21896) at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (compiler.js?d6e4:21511) at CompileMetadataResolver.loadDirectiveMetadata (compiler.js?d6e4:21375) at eval (compiler.js?d6e4:27474) at Array.forEach () at eval (compiler.js?d6e4:27473) at Array.forEach () at JitCompiler._loadModules (compiler.js?d6e4:27470)
My guess is that something conflicts between jHipster's generated modals and mdbootstrap modals, however this exception is very vague and I have no idea what to go. I want to keep the structure of jHipster but I don't know how to solve this. Thanks.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 9.3.1
- Device: All
- Browser: All
- OS: All
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 4 years ago
Please add some example code on which we will be able to reproduce this problem.
Vlad Herescu commented 4 years ago
I have no usefull code that I can provide you. I mean I have no clue what causes it. I commented half the code in order to understand the root of the problem and I had no clue. All I can say is that I imported your framework into a fresh jHipster Angular project. Angular 9, MdBootstrap 9, jhipster 6. You should check up the compatibity with jHipster default app because it seemed to me quite a few people had problems here. I repeat, I added absolutely no code at all, just integrated the mdBootstrap in to the Angular project by following all your recomended steps and several guides onlines which all said the exactly same thing
Arkadiusz Idzikowski staff commented 4 years ago
You didn't even use any HTML/TS modal code? Just imported MDB modules/styles and served the application?
Vlad Herescu commented 4 years ago
Yep. Created jHipster project with angular, not writing a single line of code => project working => imported md bootstrap library => project not working anymore with the above mentioned error.
For the moment I abandoned mdboostrap and oriented towards other options because of this compatibility issue. But you should check this out because other might run into it too
Arkadiusz Idzikowski staff commented 4 years ago
We will definitely check that, thank you for letting us know about this problem.