question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

this.currentStep is undefined

See original GitHub issue

Hi there. Thanks for your library. I tried using it following the instructions in the readme but I was unable to get it working.

As per the title, I get a this.currentStep is undefined error at JoyrideStepService.showCurrentStep, which is called by JoyrideStepService.startTour.

Im guessing this part this.currentStep = this.stepsContainerService.get(this.currentStepIndex); is the one returning undefined?

My code:

<div class="branding" joyrideStep [stepNumber]="1">
    ...
</div>
<div class="header" joyrideStep [stepNumber]="2">
    ...
</div>
constructor(..., private joyride: JoyrideService) {
    ...
    this.joyride.startTour();
}

Maybe Im missing something 😁 cheers.

P.S. Im using angular 5

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kmorales13commented, May 7, 2018

Sorry for the late reply. Using the AfterViewInit hook works for me; the DOM elements were probably not ready as you mentioned. Thanks!

1reaction
rishikeshjadhavcommented, May 3, 2018

@kmorales13
I followed the steps in README and was able to run this properly, few more details about your error would help.

I have moved startTour() on a button click.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular 2 settimeout this is undefined - Stack Overflow
I'm trying to set up a setTimeout, inside a switch, that's inside a foreach, that's inside a function... TypeError: undefined is not an...
Read more >
instance of stepper component is undefined - Telerik Forums
Hello, I'm following your stackblitz example: https://stackblitz.com/run/?file=app%2Fapp.component.ts of a stepper form but when I cl...
Read more >
Code collaboration - Sturdy
15, get currentStep(): Step | undefined {. 16, return this.#steps.value[this.#currentIndex.value]. 17, }. 18. 19, get refs(): Record<string, Ref<unknown>> {.
Read more >
Primefaces 8.0 Wizard component gives "Uncaught TypeError ...
Uncaught TypeError: Cannot read property 'currentStep' of undefined at Object.oncomplete (components.js.xhtml?ln=primefaces&v=8.0:74) at ...
Read more >
How to use the jquery.fn function in jquery - Snyk
currentStep }; } return retVal; } }; // WIZARD PLUGIN DEFINITION $.fn.wizard = function ... data[option](value); }); return (methodReturn === undefined) ?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found