Question: Suppose we have an array declared in an Angular component as follows: colours: string[]; Using the *ngFor attribute, how would we code a set of
- Suppose we have an array declared in an Angular component as follows:
colours: string[];
Using the *ngFor attribute, how would we code a set of paragraphs in the template (using
tags) of the form:
Colour 1 is red
Colour 2 is yellow
Colour 3 is pink
This assumes the array is initialised with the strings red, yellow, pink, etc. (5 marks).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
