I am new with angularjs and I am trying to add some dynamic content to the DOM. What I want to do is a little bit like twitter for example. I have a table with different rows and if the user click on a row, there is some details ajax loaded just ender the row. I have a template for the row details (which I want to display (and compile) just ender the clicked row. As I don't realy understand how to trigger a directive with click, I have tried to do it from a controller function (with ng-click on the row) but I can't compile (I only have the template displaying).
If anyone has an idea how to do it (and best, a way to do it with directive as it seems to be the right way to do it).
Thanks
Since it is not clear how complicated your template is that you want to add, you may not need a directive — ng-repeat on the <tr> element may be enough. On the AngularJS home page, the "Wire up a Backend" demo, tab list.html shows how to dynamically add rows to a table using ng-repeat, with data that was retrieved via the query() method. Is this sufficient for your needs?