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

onStart and onEnd not working?

Open HeadwayLabs opened this issue 9 years ago • 5 comments

I am trying to call a function in my controller on an element with a tour using:

on-end="end(tour)"
$scope.end = function (tour) {
        localStorage.set('tour-ended');
};

But I cant get it to work. I can use onShow, OnNext, OnHide etc, but not onEnd and start for some reason.

Any help would be appreciated.

Thanks

HeadwayLabs avatar Sep 23 '15 17:09 HeadwayLabs

I believe this is due to Angular's multi-element directives feature that looks for attribute and element names ending with "start" and "end". Try changing it to on-end-end="end(tour)".

benmarch avatar Sep 23 '15 19:09 benmarch

I tried this but no luck. I am expecting it to fire when I click the end tour button on any step. Is this correct?

HeadwayLabs avatar Sep 23 '15 21:09 HeadwayLabs

I tested this locally and it should just be on-end="end(tour)", sorry for the confusion (for onStart you have to use on-start-start). It looks like it is working as expected, the function I created does fire when I click the "End Tour" button. Can you paste some markup and controller code here so I can take a look? My best guess is that your end function is not in scope.

benmarch avatar Sep 23 '15 21:09 benmarch

Any update on this?

benmarch avatar Oct 20 '15 14:10 benmarch

Any update, @HeadwayLabs?

benmarch avatar Jan 04 '16 21:01 benmarch