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

Doesn't work with directives or ng-include #8

Open sonoman opened 10 years ago

sonoman commented 10 years ago

Hello ! I want to confirm an issue I'm having I have a view with this (simpliefied) form

If I copy your example in this html, it works great....if I paste it either in the template of the directive or in the html I include with the ng-include tag, it does not....I tried putting the "tour" tag in this level, wrapping everything (its own html and the includes and the directive), and putting some tourtips inside the directive.....and nothing. Is this what I should expect ?

vidakovic commented 10 years ago

Here the same.

kyranjamie commented 10 years ago

This is a scoping issue. I've ran into the same problem trying to integrate this with a moderate complexity app with some nested directives.

It will work fine for directives that do not have isolated scopes. See demo here.

Maybe the logic should be moved into a service so we can use it anywhere easier?

kennethlynne commented 10 years ago

Aww. This was a showstopper..

kennethlynne commented 10 years ago

Figured his one out: You can create multiple tours, and set their step to -1 to hide all but one. Then in the one tours complete callback set the next tours step to 1 to start that part. This makes it possible to have multi-page tours also.

yhnavein commented 9 years ago

Quite late, but maybe still useful: check out my PR: #28. I've introduced virtual steps, which allow you to create tour steps regardless of the scopes at all. (or ng-include, directives, etc) I was making these changes for angular-tour to use it in a very big and complicated angular app.