I am trying to render object properties using keys in angular2 using below code:
-
This is just Angular2 change detection at work calling loadProperty(i,element)
over and over in each change detection cycle.
Calling methods from the template is discouraged because they are called very often. You should instead store the result in a property and bind to this property instead.