Week 7 — Angular

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/42

encourage image

There's no tags or description

Looks like no tags are added yet.

43 Terms

1
New cards
[Angular Introduction and CLI] What is Angular?
Angular is a TypeScript-based frontend framework for building component-based single-page applications.
2
New cards
[Angular Introduction and CLI] What is a single-page application?
An SPA loads an application shell and updates views in the browser without full page reloads for every navigation.
3
New cards
[Angular Introduction and CLI] What is Angular CLI?
A command-line tool that scaffolds, builds, tests and serves Angular projects.
4
New cards
[Angular Introduction and CLI] What do ng new, ng serve and ng generate component do?
ng new creates a project; ng serve starts a development server; ng generate component creates component files.
5
New cards
[Angular Introduction and CLI] What is a component in Angular?
A class paired with a template and metadata that controls a reusable portion of the UI.
6
New cards
[Angular Introduction and CLI] What is the purpose of a bundler?
It combines and optimizes application modules and assets for browser delivery.
7
New cards
[Angular Templates and Components] What is an Angular template?
HTML enhanced with Angular binding syntax, expressions and directives to render component state.
8
New cards
[Angular Templates and Components] What is interpolation?
Double curly braces display an evaluated expression in a template, such as {{ userName }}.
9
New cards
[Angular Templates and Components] What is property binding?
Square brackets bind a DOM or component property to an expression, such as [disabled]="isSaving".
10
New cards
[Angular Templates and Components] What is event binding?
Parentheses bind an event to a handler, such as (click)="save()".
11
New cards
[Angular Templates and Components] What is a template reference variable?
A local template variable declared with #, used to refer to an element or directive instance.
12
New cards
[Angular Templates and Components] What is content projection?
ng-content allows a component to display markup supplied between its opening and closing tags.
13
New cards
[Angular Templates and Components] What is the difference between standalone and NgModule-based components?
Standalone components declare their own imports; NgModules group declarations and imports in the older organizational model.
14
New cards
[Angular Lifecycle and Change Detection] What is ngOnInit?
A lifecycle hook invoked after Angular initializes a component's inputs; often used for initialization logic.
15
New cards
[Angular Lifecycle and Change Detection] What is ngOnDestroy?
A lifecycle hook used for cleanup such as unsubscribing or releasing resources.
16
New cards
[Angular Lifecycle and Change Detection] What is ngOnChanges?
A hook called when bound input values change, with information about those changes.
17
New cards
[Angular Lifecycle and Change Detection] What is Angular change detection?
Angular checks relevant application state and updates rendered bindings when values change.
18
New cards
[Angular Lifecycle and Change Detection] What is OnPush change detection?
A strategy that limits checking primarily to input-reference changes and other explicit change triggers.
19
New cards
[Angular Lifecycle and Change Detection] What are Angular signals?
Reactive value containers that notify dependent computations and views when their values change.
20
New cards
[Angular Directives and Pipes] What is a directive?
An Angular class that adds behavior to an element or changes how template content is rendered.
21
New cards
[Angular Directives and Pipes] What is a structural directive?
A directive that changes DOM structure by adding or removing embedded views, such as *ngIf or *ngFor in older syntax.
22
New cards
[Angular Directives and Pipes] What is an attribute directive?
A directive that changes appearance or behavior of an existing element, such as ngClass or ngStyle.
23
New cards
[Angular Directives and Pipes] What is a pipe?
A template transformation that formats values for display, such as date, currency or uppercase.
24
New cards
[Angular Directives and Pipes] What is a custom pipe?
A class implementing PipeTransform and decorated with @Pipe to provide reusable transformations.
25
New cards
[Angular Directives and Pipes] What is the difference between pure and impure pipes?
Pure pipes run when input values or references change; impure pipes may run on every change-detection cycle.
26
New cards
[Angular Binding and Communication] What is one-way data binding?
Data flows from component to view through interpolation or property binding, or from view to component through events.
27
New cards
[Angular Binding and Communication] What is two-way data binding?
It synchronizes a value between the component and an input, commonly using [(ngModel)] with FormsModule.
28
New cards
[Angular Binding and Communication] What is @Input?
A component input accepts data passed down from a parent component.
29
New cards
[Angular Binding and Communication] What is @Output?
A component output emits events that a parent component can handle.
30
New cards
[Angular Binding and Communication] How can unrelated components share state?
Use a shared injectable service, often with signals or RxJS observables.
31
New cards
[Angular Binding and Communication] What is the difference between template-driven and reactive forms?
Template-driven forms define much behavior in templates; reactive forms define explicit form models and validation in TypeScript.
32
New cards
[Angular Routing and Guards] What is Angular Router?
Angular Router maps URLs to components and enables navigation without full page reloads.
33
New cards
[Angular Routing and Guards] What is router-outlet?
A directive marking where the activated route's component is rendered.
34
New cards
[Angular Routing and Guards] What is routerLink?
A directive that navigates between application routes without a normal page reload.
35
New cards
[Angular Routing and Guards] What is a route guard?
Logic that permits, blocks or redirects navigation based on conditions such as authentication.
36
New cards
[Angular Routing and Guards] What is lazy loading in Angular?
Loading route code only when needed to reduce the initial JavaScript bundle.
37
New cards
[Angular Routing and Guards] Why is a route guard not sufficient authorization?
Client-side checks can be bypassed; the backend must independently enforce access control.
38
New cards
[Angular Services and Dependency Injection] What is an Angular service?
An injectable class that encapsulates reusable logic, state or API communication outside UI components.
39
New cards
[Angular Services and Dependency Injection] What does @Injectable do?
It marks a class as eligible for Angular dependency injection and can configure where it is provided.
40
New cards
[Angular Services and Dependency Injection] What does providedIn root mean?
Angular provides a typically application-wide service instance from the root injector.
41
New cards
[Angular Services and Dependency Injection] What is Angular dependency injection?
A mechanism that supplies services and other dependencies to components or classes through injectors.
42
New cards
[Angular Services and Dependency Injection] What is HttpClient?
Angular's API for making typed HTTP requests and receiving responses as observables.
43
New cards
[Angular Services and Dependency Injection] What is an RxJS Observable?
A representation of a stream of asynchronous values that can be subscribed to and transformed with operators.