Angular is a framework or library? ANS✔✔ Angular is a framework, as it has
all features in the build. Like a router, HTTP module for ajax call, browser
animation, unit testing support with Jasmin Karma, and so on. Whereas
React, Vue is a library as every respective task like routing, HTTP call, unit
testing requires separate library support.
What is the current version of Angular? ANS✔✔ Currently, angular version
15 has been released. 16 in may
What is the design pattern supported by Angular? ANS✔✔ Angular followed
MVC design pattern,
, Solution 2024/2025
Pepper
where M defines Model (Logic and request-response data model),
V defines View (HTML, CSS, all kind of UI component)
and C defines Controller (the connection between view & model).
What are Angular life Cycle hooks? give some examples. ANS✔✔ Angular
lifecycle hooks are a set of methods that are called at specific points during
the lifecycle of an Angular component or directive. These hooks allow
developers to write code that responds to changes in the component or
directive, and to perform tasks such as initializing component data, handling
user events, and cleaning up resources when a component is destroyed.
Here are some examples of Angular lifecycle hooks:
ngOnInit(): This is called once after the component is initialized and all its
inputs have been bound. This is a good place to perform one-time
initialization tasks such as retrieving data from a server.
ngOnChanges(): This is called when one or more of the component's input
properties change. This hook provides information about the changes that
occurred, such as the previous and current values of the input properties.
ngOnDestroy(): This is called just before the component is destroyed. This is
a good place to perform cleanup tasks such as unsubscribing from
observables or releasing resources.
, Solution 2024/2025
Pepper
ngAfterViewInit(): This is called once after the component's view has been
initialized. This is a good place to perform initialization tasks that require
access to the component's view, such as setting up event handlers.
ngDoCheck(): This is called during every change detection cycle, which can
be triggered by a variety of events such as user input or data changes. This
hook allows developers to perform custom change detection logic.
What is decorator (metadata) in Angular? give some example - ANS✔✔
What is decorator (metadata) in Angular? give some example -
A. Decorator that marks a class as an Angular component and provides
configuration metadata that determines how the component should be
processed, instantiated, and used at runtime.
The metadata represents by the decorator.
Example: @Component, @Directive, @Input, @Output, @ViewChild,
@HostListner, @HostBinding and so on.
What is data binding? is it possible to have one-way and two-way binding
from view to the source? ANS✔✔ Data binding means - a component object
is interpolated with an HTML template, so the object value can be displayed
in HTML.
yes it is
One-way binding (component to HTML): ANS✔✔ {{ object_expression }} OR
[target]='object_expression'
One-way binding (HTML to component) ANS✔✔ (target)='statement'
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Schoolflix. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $14.99. You're not tied to anything after your purchase.