Return to site

🅰️1️⃣7️⃣ What is the correct way to write a for loop with the new @-syntax in Angular 17?

· fullstack



The correct answer is A. The new @-syntax uses the of keyword to iterate over an iterable object and the track parameter to specify the tracking expression, similar to the trackBy function in the *ngFor directive¹². The in keyword and the trackBy parameter are not valid in the new @-syntax.


(1) Angular 17: New control flow syntax | by Alain Chautard | Nov, 2023 ....

(5) Unveiling Angular 17: The Future Brings Novel Syntax for Control Flow ....