DaftMonk / angular-tour

AngularJS directive for giving an interactive tour of your website.
http://daftmonk.github.io/angular-tour/
MIT License
609 stars 137 forks source link

How to not autostart tour? #5

Closed beniwtv closed 10 years ago

beniwtv commented 10 years ago

Hi,

I have a global variable in my app that should control whether to show the tour or not (e.g. users returning from another page should not have the tour anymore).

How can I achieve that?

Ideally, there would be a pre-tour callback that could be fired that could return true / false.

DaftMonk commented 10 years ago

You can set the tour-step to -1 and it will not show the tour. Then when you want to show the tour, you can set it to 0 to show the first step, or to whatever step you'd like to display.

beniwtv commented 10 years ago

Thanks!

davidwill commented 10 years ago

This should be part of the readme. Maybe my issue is unique, but I couldn't, for the life of me, get the tour to not auto-start without setting the current step to -1. The demo didn't make this obvious, and it caused some frustration.

alpemaca commented 9 years ago

+1 for include this in readme