HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Custom directive when specific route/controller
shawee
New
Bonjour, I'd like to manipulate DOM (launch directive) only when a specific page (route+controller) is triggered. In my app.js, it seems I can only lanch directive when app.js is called (always). How could I do it ? Merci, S.
Tagged:
0
Comments
Sorry not understanding the question. You want to load a script only for a specific controller / route?
Or you want to within a script, run a function based on controller route?
The first you just use the appropriate hook/logic.
The second, probably the easiest is to just a pass a definition to the client based on above, which you can use in your logic.
grep is your friend.
You might ask you question in French, someone here may be able to translate.
grep is your friend.
Well, that is awkward... http://stackoverflow.com/questions/28275640/angular-custom-directive-when-specific-route-controller
If you have a AngularJS question, you might better ask in a AngularJS forum
Man, you're very active!
http://discuss.codeschool.io/t/custom-directive-when-specific-route-or-controller/7663
https://groups.google.com/forum/#!topic/angular/5jY1EnfY6W8
Nevertheless: if I would know anything about AngularJS, I'd try to answer your question, but I do not know anything about it othen than that it is a semantical mess.
But hey! How about asking me an Excel question instead?
By the way: as part of a very helpful community, I feel deeply honored that you come here to ask a question that is not related to Vanilla at all. I take this as a sign of trust in the Vanilla community members, who answere with true dilligence to each and every question!
@R_J don't flog a dead horse.
grep is your friend.
Maybe that is helpful? http://stackoverflow.com/questions/13681116/angularjs-dynamic-routing
@x00: I'm having a ball
I really enjoy being helpful, but from time to time I miss the fun you can have in a not very activly moderated community that has no dedicated purpose other than being a waste of time...
thanx
My pleasure
@R_J
You could always start a separate thread for that!
We have a virtual pub on our forum for just such a purpose (although, tbh, our members are pretty handy at hijacking any thread and making it about puns, biscuits, fish or wool...)