this.currentStep is undefined
See original GitHub issueHi 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:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for the late reply. Using the AfterViewInit hook works for me; the DOM elements were probably not ready as you mentioned. Thanks!
@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.