NMilicic / ngx-bootstrap-product-tour

Angular product tour library
MIT License
12 stars 16 forks source link

unable to make it work on lazy load modules ngx-bootstrap-product-tour #7

Closed chinna-magapu closed 6 years ago

chinna-magapu commented 6 years ago

hi I am using ngx-bootstrap-product-tour in my app. and i was imported this module in my app.module,

NgxBootstrapProductTourModule.forRoot(),

and initilized in app.component .ts

But this service is not working in the lazy loaded modules. and not getting any error. Later i tried to import module in lazy loaded module and re initialized in the lazy loaded component with no luck.

i tried to add NgxBootstrapProductTourModule.forChild(), but it throes an error , for child is not implemented in this module

can any one help me on how to implement this feature in lazy loaded modules.

chinna-magapu commented 6 years ago

@NMilicic Thanks for your update. I have updated to the latest 2.0.1 But it was didn't work for me. can you provide any sample code to implement with the lazy loaded modules.

NgxBootstrapProductTourModule.forRoot(), is working only with main module but not with the lazy loaded modules

NMilicic commented 6 years ago

@chinna-magapu I´ve created an example in demo page. You can find source code here: https://github.com/NMilicic/ngx-bootstrap-product-tour/tree/master/src/app/lazy-load-demo

But things that you need to do is: Import NgxBootstrapProductTourModule.forRoot() in main module Import NgxBootstrapProductTourModule in lazy loaded module, without forRoot()

Let me know if that worked for you.

chinna-magapu commented 6 years ago

@NMilicic Thanks for your quick response. It worked for me. Thanks a lot