ahmed-wagdi/angular-joyride

Documentation doesn't explain how to use afterStep.

Closed this issue · 3 comments

Documentation doesn't explain how to use afterStep.

I assumed afterStep was similar to beforeStep, but when I included a line for joyride.resumeJoyride(); in my afterStep function, it repeated the same step I was already on (i.e., it resumed from the beginning of the current step instead of advancing).

I would prefer it if I could use functions interchangeably in beforeStep and afterStep

It's not documented because I've been meaning to remove the afterStep function completely, i can't think of any problems the afterStep callback can cover that beforeStep can't.

What exactly do you need afterStep for?

I have some steps where I want to run two functions directly after (change location and run some other code). I suppose I could just lump them both into one custom function. But if I could use afterStep, then I wouldn't need to write a custom function for that single case.

I guess it would be fine if you removed it, but I was curious why it wasn't documented and I wanted to know how I was supposed to be using it.

I just don't want to add any unnecessary complexity if it doesn't add any real value. I might reconsider adding it if there was a certain case where afterStep worked better but as of right now that doesn't seem to be the case.