AngularJavaScript Frameworks

Create A Flight List Table in Angular (Three Part Series)

Part 2: We’ll modify the table heading to align them with the fields in the JSON data which we will be adding. Next, we’ll create a property called “flightData” and add it to the root component. We’ll also create a function called deleteFlight(id) which accepts the id of the FlightData. Finally, we’ll clean up the table rows and use a *ngFor and *ngIf directives to iterate through the flightData and build each record dynamically.

The stae of our app.component.ts after part 2.

TypeScript

The state of our app.component.html after part 2.

HTML
Verified by MonsterInsights