Iterable abstract class for TypeScript
Make any object iterable with the Typescript Iterable abstract class. The iterable class uses the standard Symbol.iterator symbol for iteration.
Install
The easiest way is to install ts-iterable
as dependency
:
npm install ts-iterable --save
Usage
Extending the Iterable abstract class
for...of
instruction
With the for of cart // Displays:// "flour"// "eggs"// "milk"
ngFor
directive
With the Angular's cart.component.ts
cart.component.html
Your cart {{article}}
License
Code licensed under MIT License.