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

Close tour if already viewed #12

Open cmbirk opened 10 years ago

cmbirk commented 10 years ago

In a parent controller, I'm able to set the cookie to remember what step I was previously on, but I'm trying to not show the tour if it's already been viewed. Currently, I'm setting the cookie step to -1 when the tour completes. I'm trying the following:

if($cookies.myTour < 0){
  closeTour();
}

But it's saying closeTour is undefined, which makes sense because it's in the child scope. Is there any way to stop the tour from firing?

cmbirk commented 10 years ago

@DaftMonk do you know of any way to stop the tour from firing?