Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Angular Part 1 – Homework

1. Create a new Angular app. Generate a component called students and include it
in root.
2. In the students component:
a. Create mock data with objects representing students.
b. The objects should contain first name, last name and grade average.
c. Display two lists, one with students who passed (grade average >= 5) and
one with students who failed.
d. The lists should show the first name, last name and grade average for
each student.
e. Styling is not important for this assignment, just some basic positioning so
that the two lists can be easily read.
3. Add a button to the students component which generates a new entry with
random data and displays it in one of the two lists, depending on the grade
average.
4. Create a new component called list:
a. It should have a data @Input and a generate @Output.
b. Move the list display logic and the button in the new component.
c. The students component should just create the mock data and use the
list component twice, providing the passed and failed students
respectively.
d. The students component should also generate a new entry, depending
on which button was clicked.

You might also like