I am studying what's the best client-side javascript framework for use, I am studying AngularJS, BackboneJS and Dojo. My first tests are with AngularJS, in each framework I need to do a TreeView, DataTable and charts.
I did my first test in AngularJS with DataTable, but I need to do a DataTable more full, with more functionalities. But I am finding problems, maybe for understand better the framework.
I have found this link which have a perfect example that I need. But now I have a doubt, about integration between the plugin(DataTables) and o AngularJS.
http://jsfiddle.net/zdam/7kLFU/
This scope array link my Json Data with VIEW(Full code in jsfiddle):
$scope.columnDefs = [
{ "bSearchable":false, "mDataProp": "@uri", "aTargets":[0]},
{ "bSearchable":false, "mDataProp": "id", "aTargets":[1]},
{ "bSearchable":true, "mDataProp": "title", "aTargets":[2] },
{ "bSearchable":false, "mDataProp": "count", "aTargets":[3] },
{ "mData": null, "sDefaultContent": "<img ng-click='edit()' src='edit.gif' />", "aTargets":[-1] }
];
I am thinking a little strange to use this way, because if I will put, for example, icons(edit, delete), I will need put, for example, this way:
{ "mData": null, "sDefaultContent": "<img ng-click='edit()'
> src='edit.gif' />", "aTargets":[-1] }
I am mixing HTML. I think there is a better way for to do it. What's the best way to do it?
My other question. In your opinion which one is the best?
Thanks