frontend for java full stack development coursera week 3 answers

Angular Components - Practice Quiz

1. What is the purpose of Angular decorators in Angular framework?

  • To define the styles for Angular components
  • To encapsulate the logic and data of Angular components
  • To configure the behavior and metadata of Angular components
  • To create reusable UI components in Angular applications

2. Which of the following is not a lifecycle hook in Angular?

  • ngOnInit
  • ngOnChanges
  • ngOnDestroy
  • ngAfterViewUpdate

3. Which of the following is NOT a type of decorator in Angular?

  • @Component
  • @Directive
  • @Module
  • @Service

4. Which of the following is NOT a comparison operator in JavaScript?

  • ==
  • ===
  • !=
  • <> (Correct Answer)

Angular Databinding - Practice Quiz

5. What is Angular Data Binding?

  • A process of connecting Angular application with an external API.
  • A way to define data types in Angular application.
  • A technique to share data between components in an Angular application.
  • A mechanism to automatically synchronize data between the view and the model in an Angular application.

6. What is Angular Two-way Data Binding?

  • A technique to bind data from the model to the view only.
  • A technique to bind data from the view to the model only.
  • A technique to automatically synchronize data between the view and the model in both directions.
  • A technique to manually synchronize data between the view and the model in both directions.

7. What is Angular Event Binding?

  • A technique to automatically synchronize data between the view and the model.
  • A technique to bind data from the model to the view only.
  • A technique to bind data from the view to the model only.
  • A technique to handle events in the view and trigger actions in the component.

Angular Directives - Practice Quiz

8. What are Angular Directives?

  • A way to style elements in Angular.
  • Instructions to modify the DOM or behavior of HTML elements in Angular.
  • A way to define Angular components.
  • A way to define Angular modules.

9. What is Angular ngIf Directive?

  • A directive used to apply styles to elements in Angular.
  • A directive used to modify the DOM structure in Angular.
  • A structural directive used to conditionally render or remove elements from the DOM in Angular.
  • A directive used to define custom elements in Angular.

10. What is Angular ngFor Directive?

  • A directive used to apply styles to elements in Angular.
  • A directive used to repeat elements in the DOM based on an array in Angular.
  • A directive used to modify the DOM structure in Angular.
  • A directive used to define custom elements in Angular.

11. What is Angular ngStyle Directive?

  • A directive used to apply styles to elements in Angular.
  • A directive used to modify the DOM structure in Angular.
  • A directive used to repeat elements in the DOM based on an array in Angular.
  • A directive used to define custom elements in Angular.

Leave a Reply