ng-tasty
ng-tasty copied to clipboard
using ngTasty in ControllerAs syntax?
Hi There, I would like to use the grid without using the $scope inside my controller. Particularly, that I am using typescript and I would like to avoid mixing scope inside the controllers. Can I use controllerAs syntax to set the ngTasy resource. I would like to be able to use something like:
this.gridResource = {
header: [],
rows: thisController.Contacts; // Where this is an array
};
And then inside the view as:
<div tasty-table bind-resource="VM.gridResource" bind-filters="VM.applyFilterTextbox">
</div>
Is this possible? Any examples would be appreciated.
Thanks
Honestly not a big fun of ControllerAs and I never use it before. Sorry!