isaacplmann / ngx-tour

Product Tour Built in Angular

Home Page:https://isaacplmann.github.io/ngx-tour

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Renderer2 renderer.listen is not a function

rezaeieng1994 opened this issue · comments

I'm using ngx-popper-tour.
when I subscribe to events, in production build some errors appear in the console.
I can't find the cause and how to solve it.
there is errors and related codes below:
Errors :

TypeError: this.renderer.listen is not a function at n.e.show (main.bundle.js:1) at e.showTourStep (main.bundle.js:1) at n.e.showStep (main.bundle.js:1) at n.e.setCurrentStep (main.bundle.js:1) at main.bundle.js:1 at t.invokeTask (polyfills.bundle.js:1) at Object.onInvokeTask (main.bundle.js:1) at t.invokeTask (polyfills.bundle.js:1) at e.runTask (polyfills.bundle.js:1) at e.invokeTask (polyfills.bundle.js:1)

Error: Uncaught (in promise): TypeError: this.options.onUpdate is not a function TypeError: this.options.onUpdate is not a function at e.<anonymous> (main.bundle.js:1) at e.value (main.bundle.js:1) at main.bundle.js:1 at t.invoke (polyfills.bundle.js:1) at Object.onInvoke (main.bundle.js:1) at t.invoke (polyfills.bundle.js:1) at e.run (polyfills.bundle.js:1) at polyfills.bundle.js:1 at t.invokeTask (polyfills.bundle.js:1) at Object.onInvokeTask (main.bundle.js:1) at S (polyfills.bundle.js:1) at polyfills.bundle.js:1 at t.invokeTask (polyfills.bundle.js:1) at Object.onInvokeTask (main.bundle.js:1) at t.invokeTask (polyfills.bundle.js:1) at e.runTask (polyfills.bundle.js:1) at d (polyfills.bundle.js:1) at e.invokeTask (polyfills.bundle.js:1) at invoke (polyfills.bundle.js:1) at n.args.(anonymous function) (http://localhost:42515/polyfills.bundle.js:1:35390)

Codes:
self.tourService.stepHide$.subscribe(step => { // Code });
self.tourService.stepShow$.subscribe(step => { // Code });
self.tourService.end$.subscribe(res => { // Code });

Are you building production version using ng build --prod? What does your code do?

Are you building production version using ng build --prod? What does your code do?

Yes, It works in dev build but not in the production build.
The code doesn't include any strange actions.

You still did not answer whether you are using --prod flag when building production version of your app or not.