Questions and CORRECT Answers
What is Angular? - CORRECT ANSWER - A front end framework made with TypeScript
consisting of:
components (dynamic views): single-paged application with routing
modules: (different sections/layers)
services for Http
Manipulating DOM with Databinding
What is a component? - CORRECT ANSWER - a building block of an Angular
application that represents a part of the user interface.
It consists of a template, a class, and metadata that describe the component's behavior and
appearance.
What is a directive in Angular? - CORRECT ANSWER - A directive is a type of
component that modifies the behavior or appearance of a DOM element.
Directives can be either structural or attribute directives.
What is a service in Angular? - CORRECT ANSWER - A service is a class in Angular that
can be used to share data or logic between components. Services are typically used to handle
tasks such as making HTTP requests, caching data, or handling user authentication.
What is the difference between ngIf and ngSwitch? - CORRECT ANSWER - ngIf is a
structural directive that conditionally adds or removes elements from the DOM based on a
Boolean expression. ngSwitch is also a structural directive that conditionally renders elements
based on a switch expression.
What is data binding - CORRECT ANSWER - Data binding is a way to connect data in a
component to the user interface, allowing changes in one to be reflected in the other.
property binding, event binding, and two-way binding.