angular-tour icon indicating copy to clipboard operation
angular-tour copied to clipboard

Question about steps

Open mistafi opened this issue 11 years ago • 3 comments

Greetings! Good work.

While adding walkthrough to one of my projects, I noticed that when I close the tour when it first opens using closeTour() - openTour() no longer fires.

This is problematic as a user may want to close it immediately, but come back to it later.

I also tried keeping the tour from firing on page load, but that did not work either.

Your help is appreciated!

mistafi avatar Oct 08 '14 20:10 mistafi

After researching this more, it does fire, but it appears that some is wrong in self.currentStep.

In this line: var startStep = self.currentStep >= steps.getCount() || self.currentStep < 0 ? 0 : self.currentStep;

If you change it to:

var startStep=self.currentStep>=steps.getCount()||self.currentStep<0?0:0;

The functionality comes back.

I was also trying to figure out a solution to keep it from firing every time I hit the page.

For some reason, the cookie never logs, although the $scope can be logged out.

In any case, setting self.currentStep = -1 keeps it from firing at page load.

I do not see this as a definitive solution, as this feels hacky and dirty, but it works...please comment if anyone knows a better way.

mistafi avatar Oct 09 '14 20:10 mistafi

Thanks for That

Jose-27 avatar Dec 11 '14 19:12 Jose-27

I was able to fix this by setting $scope.currentStep = 0; in the controller.

mbuttu avatar Apr 23 '15 15:04 mbuttu