I am trying to generate a tutorial module with Angular for my standard angular module (something to show the user how to use the UI, as some of our users are quite old people who need a bit of help). When doing so, I want the tutorial to get access to the main application and control everything. So far I can add data to the model and the main swallows it without any problem, making it quite easy to add mock data for the explanation.
That said, when the user clicks on the elements or interacts with them, I do not want to send any request to the server as this is a tutorial, fake, mock, so I want to disable the standard behavior at least for the tutorial elements and add my own ones (probably, go to next step on the tutorial).
But I don't want to need to use directives or booleans on the model like "isThisTutorial" or "isTutorialOn" as I want to isolate the tutorial and make it independent from the main, I don't want the main project to need to know anything about the tutorial, except for the call I make to activate it.
I thought I could try to access the elements with jQuery and override the behavior but it doesn't seem to work, as Angular still has the control (or maybe I'm doing something wrong). So, having in mind that I have access to the same scope, and I can modify the model at will, how can I take the UI control from the main Controller with my tutorial module Controller? Is that possible?
Thanks.
Update note: I found that jQuery actually works, only problem is that Angular had not yet digested the new data on the model so the element is not yet on the DOM when I try to access it. Even so, open to alternatives.