Open evm2556 opened 6 years ago
@evm2556 You don't need anything else, you just add NgxBootstrapProductTourModule.forRoot() to your module.
But this looks like some error with ngx-bootstrap. What version of ngx-bootstrap are you using?
P.S. Maybe it will help you have demo src code here
Im using ngx-bootstrap": "^2.0.5, "ngx-bootstrap-product-tour": "^2.0.2
. Ill continue to try and debug, im able to reproduce with ng serve --aot within my app. Now i can see non-bundled errors.
Looks like this issue. https://github.com/isaacplmann/ngx-tour/issues/80
core.js:1449 ERROR Error: No component factory found for PopoverContainerComponent. Did you add it to @NgModule.entryComponents?
at noComponentFactoryError (core.js:3929)
at CodegenComponentFactoryResolver.resolveComponentFactory (core.js:3993)
at ComponentLoader.attach (component-loader.class.js:45)
at NgxBootstrapPopoverDirective.PopoverDirective.show (ngx-bootstrap-product-tour.es5.js:834)
at NgxBootstrapProductTourDirective.showTourStep (ngx-bootstrap-product-tour.es5.js:16150)
at NgxBootstrapProductTourService.showStep (ngx-bootstrap-product-tour.es5.js:16040)
at NgxBootstrapProductTourService.setCurrentStep (ngx-bootstrap-product-tour.es5.js:16022)
I downgraded to ngx-bootstrap 2.0.4, deleted from node_modules, and reinstalled/reset app. Same issue.
The issue is that there are 2 references to PopoverContainerComponent. one from ngx-bootstrap-product-tour and one from ngx-bootstrap. When angular tries to resolve the reference it does
ngx-bootstrap-product-tour.PopoverContainerComponent === ngx-bootstrap.PopoverContainerComponent
and that fails.
Sorry if this doesnt make sense. If you npm install ngx-bootstrap-product-tour into an app you can see it in node_modules\ngx-bootstrap-product-tour\ngx-bootstrap-product-tour.es5.js
, trying to make a plunker for it now.
@NMilicic : did you find any solution for it .
Have the same problem in aot mode. Any idea how to solve it?
I was not able to resolve this issue.
I just copied the source code from lib folder here and added it to my source code . it finally worked . PS: its not a solution but still a workaround .
I did do try that and got it working, but again, thats not using the bundled version.
is ng serve working fine ?? u need to import everything from the copied folder now .
as i have kept it under assets . so now import statements go like this
import { NgxBootstrapProductTourService } from 'assets/ngx-bootstrap-product-tour';
I Have the same problem in aot mode. Any idea how to solve it?
@long241191 : there has been no soluion for that for now as i was unable to find it . but u can use the workaround that has been suggested above that is using the actual source code and adding it to your code.
I'm sorry but I just can't reproduce the problem. Can anyone make a plunker or repo containing soluting where I can reproduce the error?
@NMilicic : ng serve --prod is always success but when we see on view , it shows error Error: No component factory found for PopoverContainerComponent.
@salmaarsh06 Can you put that in plunker or repo? I've created a new angular app using angular-cli and I've installed using npm install ngx-bootstrap, bootstrap and ngx-bootstrap-tour. Added some basic steps in the tour and everything seems to be working fine using ng serve --prod and ng serve --aot
@NMilicic : ok sure . i will try to create for this .
@salmaarsh06 did you manage to reproduce the issue?
Any solution for this issue?
Im using Angular-cli to bundle my app. There is an error when the popoverDirective.show is being called.
I have routing module and ngx-bootstrap as a part of my project. Anything additional that needs ot be done?