Open esinek opened 8 years ago
@esinek as you will add 'gridHeaderCheckbox_template' to some html file, say 'gridHeaderCheckbox_template.html' and then you will need to include that html file where ever you have ng-table which uses this header template. like:
<ng-include src="'gridHeaderCheckbox_template.html'" ng-init="vm = HomeCtrl" > </ng-include>
and ng-init to pass current scope to template so that you can usevm
in template, irrespective of whatever name of your "ControllerAs" is, here ControllerAs is HomeCtrl .
Hope this helps.
I've implemented a column that is checkable and also have a header template for that column that toggles all checkable checkboxes in that column
and the header template looks like this:
The individual row checkboxes need to be part of the definition of the table and therefore must be defined for each table that supports checkboxes. I would like the have the header checkbox template be defined once for all consumers of that template, but it's difficult because all consumers' controller must be "ControllerAs" "vm".
How can I refactor the header checkbox template to be more generic and consumed by all tables that need this template - without having to have all Controllers be "vm" or rewriting the template for each Controller using their specific ControllerAs alias?