I'm trying to build a wrapping directive for a d3 force graph. I'm building a tool bar for the graph, and if you click something on the toolbar it should change stuff in the graph (hide/show labels, remove/add nodes)
What I would like is that the toolbar elements will each have an ng-click attribute that will reference the function that does its meaning, but it means that I have DOM manipulation code inside the controller. So I thought to have an elem.on event handlers, but that means that my code is very dependent on my view (the code needs to know the right selector to use etc.)
I also like to use as less jquery as i can. using jqlite is ok for me, but not sure that I want to be dependent on jquery.
What is your way to do similar stuff?
Thanks, Chaim