While searching for information, I noticed many responses regarding the use of ngFor. However, my question pertains to the angular.forEach()
method utilized in my Angular 1 controllers. Unfortunately, these are being identified as errors in TS and fail to compile.
As an illustration, here is a snippet featuring a nested loop:
_this.selectChildren = function (data, $event) {
var parentChecked = data.checked;
angular.forEach(_this.hierarchicalData, function (value, key) {
angular.forEach(value.children, function (value, key) {
value.checked = parentChecked;
});
});
};
I am curious about how this concept translates to Typescript for Angular 4. Any guidance on this matter would be much appreciated.