ahmed-wagdi / angular-joyride

A lightweight joyride directive for giving tours of your AngularJs application
MIT License
17 stars 9 forks source link

Documentation doesn't explain how to use afterStep. #11

Closed mrmcplad closed 7 years ago

mrmcplad commented 7 years ago

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

ahmed-wagdi commented 7 years ago

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?

mrmcplad commented 7 years ago

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.

ahmed-wagdi commented 7 years ago

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.