Skip to content

Angular Framework

Master Angular Framework with 50 free flashcards. Study using spaced repetition and focus mode for effective learning in Programming.

🎓 50 cards ⏱️ ~25 min Advanced
Study Full Deck →
Share: 𝕏 Twitter LinkedIn WhatsApp

🎯 What You'll Learn

Preview Questions

12 shown

What is Angular?

Show ▼

Angular is a TypeScript-based front-end framework developed by Google for building dynamic, single-page applications (SPAs). It provides a comprehensive solution including components, services, routing, and dependency injection out of the box.

What is an Angular component?

Show ▼

A component is the fundamental building block of an Angular application. It consists of:A TypeScript class decorated with @Component()An HTML templateOptional CSS stylesMetadata such as selector, templateUrl, and styleUrls

What is the purpose of the @Component decorator?

Show ▼

The @Component() decorator marks a class as an Angular component and provides metadata that tells Angular how to process, instantiate, and use the component at runtime. Key properties include:selector – the custom HTML tagtemplateUrl – path to the HTML templatestyleUrls – array of stylesheets

What is data binding in Angular?

Show ▼

Data binding is a mechanism that connects the component class to the template. Angular supports four forms:Interpolation: {{ expression }}Property binding: [property]="expression"Event binding: (event)="handler()"Two-way binding: [(ngModel)]="property"

What is an Angular service?

Show ▼

A service is a class decorated with @Injectable() that encapsulates reusable business logic, data access, or utility functions. Services are typically singletons when provided at the root level and are shared across components via dependency injection.

What is dependency injection (DI) in Angular?

Show ▼

Dependency injection is a design pattern where Angular's DI system creates and delivers dependencies (usually services) to classes that request them. Instead of a class creating its own dependencies, they are injected via the constructor:
constructor(private myService: MyService) {}

What is the purpose of the @Injectable decorator?

Show ▼

The @Injectable() decorator marks a class as available for Angular's dependency injection system. Setting @Injectable({ providedIn: 'root' }) registers the service as a singleton at the application root level, enabling tree-shaking.

What is an Angular module (NgModule)?

Show ▼

An NgModule is a class decorated with @NgModule() that organizes related code into cohesive blocks. Key metadata properties:declarations – components, directives, pipesimports – other modules neededproviders – servicesbootstrap – root component

What is the difference between declarations and imports in @NgModule?

Show ▼

declarations registers components, directives, and pipes that belong to the current module.
imports brings in other NgModules whose exported classes are needed by templates in this module. For example, importing FormsModule to use ngModel.

What are Angular lifecycle hooks?

Show ▼

Lifecycle hooks are methods that Angular calls at specific moments in a component's life. Key hooks in order:ngOnChanges() – input property changesngOnInit() – after first ngOnChangesngDoCheck() – custom change detectionngAfterViewInit() – after view initializesngOnDestroy() – before component is destroyed

What is ngOnInit and when is it called?

Show ▼

ngOnInit() is a lifecycle hook called once after the first ngOnChanges(). It is used for component initialization logic such as fetching data from a service. It is preferred over the constructor for initialization because input bindings are available at this point.

What is ngOnDestroy used for?

Show ▼

ngOnDestroy() is called just before Angular destroys the component. It is used for cleanup tasks such as:Unsubscribing from ObservablesDetaching event handlersStopping timers with clearInterval()This prevents memory leaks.

🎓 Start studying Angular Framework

🎮 Study Modes Available

🔄

Flashcards

Flip to reveal

🧠

Focus Mode

Spaced repetition

Multiple Choice

Test your knowledge

⌨️

Type Answer

Active recall

📚

Learn Mode

Multi-round mastery

🎯

Match Game

Memory challenge

Related Topics in Programming

📖 Learning Resources