First App — Angular Technical Interview Questions & Answers
First App
First App
- First app: a marks page. One component lists two students. Click Fail filter. The list shrinks. That proves binding + *ngFor + *ngIf. You don’t need a backend yet. Hard-code an array.
- Then add a route /marks. Then a service that holds the array. That is a first app a viva panel believes. A blank CLI hello-world with the default Angular logo is not a first app.
- Trap: wiring HttpClient before the array version works. If local data fails, the API will fail louder.
Technical Interview Tip: Two students + filter. Then route. Then service.
Code Examples for First App
First App — working example
import { Component } from "@angular/core";
@Component({
selector: "app-root",
template: `
<h1>{{ title }}</h1>
<button (click)="toggle()">Toggle</button>
<p *ngIf="open">Panel open</p>
`,
})
export class AppComponent {
title = "Angular practice";
open = true;
toggle() {
this.open = !this.open;
}
}First App: toggle open. Say whether the panel is on screen after one click.
How to Explain First App to an Interviewer
What should a first Angular app prove?
List + filter Binding works No API required yet