Angular_DotNetCore_Interview_QA
Angular_DotNetCore_Interview_QA
How does Angular handle routing, and how do you configure routes?
Angular uses its own Router module to enable navigation between different views or pages.
Routes are configured using the RouterModule in the app’s routing configuration, where
each route specifies a path and a component. By defining routes, Angular can load specific
components based on the URL, allowing for Single Page Application (SPA) behavior.
What are Angular Directives? Can you differentiate between structural and
attribute directives?
Angular Directives are instructions that modify the DOM. Structural directives change the
layout by adding, removing, or manipulating elements (e.g., *ngIf, *ngFor), while attribute
directives modify the appearance or behavior of an element (e.g., ngClass, ngStyle).
Explain Angular's lifecycle hooks. What is ngOnInit, and when is it used?
Lifecycle hooks are methods that Angular calls at specific moments during a component’s
lifecycle. `ngOnInit` is one of these hooks, triggered once the component's inputs are
initialized. It is often used to initialize component data.
What is RxJS, and how is it used in Angular for handling asynchronous data?
RxJS (Reactive Extensions for JavaScript) is a library for reactive programming with
observables. Angular uses RxJS to handle asynchronous events like HTTP requests. It
enables components to subscribe to data streams and manage asynchronous data flow.
Explain what Angular Modules are and how they help organize an application.
Angular Modules, represented by NgModules, organize an application into cohesive blocks
of functionality. They help encapsulate components, directives, pipes, and services,
promoting modularity and maintainability. Modules make it easier to manage dependencies
and lazy-load features.
What is .NET Core, and how does it differ from .NET Framework?
.NET Core is a cross-platform, open-source framework for building modern applications,
while .NET Framework is Windows-specific. .NET Core is optimized for cloud,
microservices, and containers.
Explain Entity Framework Core and its role in .NET Core applications.
Entity Framework Core (EF Core) is an ORM (Object-Relational Mapper) for .NET Core,
allowing developers to work with databases using .NET objects. It simplifies data access by
mapping classes to database tables and supports LINQ queries.
What are asynchronous programming concepts in .NET Core, and why are they
important?
Asynchronous programming in .NET Core helps improve performance by freeing up threads
to handle more requests. Using async/await, tasks can be executed concurrently, essential
for high-performance applications.