kendo-labs/angular-kendo

Kendo UI Grid k-data-bound

derekgreer opened this issue · 2 comments

I've seen examples of using the k-on-data-bound attribute this way:
k-on-data-bound="onDataBound()"

This approach seems wrong/inconsistent to me. I would expect that k-on-data-bound to be assigned to a function, not the results of a function call (i.e. k-on-data-bound="onDataBound"). I would expect that the directive's k-on-data-bound scope variable would be assigned to the function to call at the point it binds to the data source. As seen in this example, the onDataBound() method doesn't return anything, so it would seem that it would simply get executed as part of the angular binding process, not as part of some data binding event raised by Kendo.

Should this not be changed to work with the following syntax?

k-on-data-bound="onDataBound"

I would think about it this way:
k-on-data-bound behaves and is consistent with ng-click and should stay as is. ng-click doesn't consume the results of the action just like k-on-data-bound doesn't either.

Yeah, I suppose that makes sense now that you put it that way.