ng-tasty icon indicating copy to clipboard operation
ng-tasty copied to clipboard

using ngTasty in ControllerAs syntax?

Open RahmanM opened this issue 10 years ago • 1 comments

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

RahmanM avatar Nov 19 '15 09:11 RahmanM

Honestly not a big fun of ControllerAs and I never use it before. Sorry!

Zizzamia avatar Dec 25 '15 02:12 Zizzamia