So I am building this grid directive and have it pretty much working. One of the things I would really like to clean up is how I apply the sorting functionality. Right now I add the ng-click to each column header whether or not that column is sortable (which is defined in the columnModel configuration). Then inside the sort function is where I determine whether or not I should really sort. I would like to be able to only add the ng-click functionality if the column is sortable in the first place (this would allow me to clean up the sort function code and I can see possible wanting to do this type of functionality in the future). Is it possible to conditional add attributes similar to how ng-class adds classes conditional?
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
Do you have your project up on github? Angular-UI has a grid directive which is upated regularly. Http://angular-ui.github.com/ng-grid. How about contributing to that project since its pretty well established already? Just a thought.
Cheers,
Tim Sweet
--