I see a lot of answers about using ngFor when I search for it, but I understand ngFor. I am asking about the angular.forEach() constructor, which is used in my Angular 1 controllers. They are flagged as errors in TS and do not compile.
For example, I have one with 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; }); }); };
What does this design look like in Typescript for Angular 4?
source share