Company: Cepheid_4_feb_MCQ
Difficulty: medium
Anita is developing an Angular application and wants to apply conditional logic based on the value of an attribute of an HTML element. Which of the following statements is/are true about attribute binding in Angular? 1. Attribute binding is used to set the value of an attribute of an HTML element. 2. Attribute binding is two-way only. 3. The square brackets syntax is used for attribute binding. 4.
Which of the following statements about component styles in Angular is correct?
Which of the following statements are true about Angular Elements? 1. Angular Elements allow you to package Angular components as web components. 2. Angular Elements are similar to Custom Elements but have some additional capabilities. 3. To create an Angular Element, you need to use the '@angular/elements' package. 4. Angular Elements work in all modern browsers, including Internet Explorer.
Alice is building an Angular application with a button click event to change background color. Code: Change Color and changeColor() { this.backgroundColor = 'red'; }. Which of the following could be the reason why the code is not working as expected? 1. Button not in template. 2. backgroundColor variable not defined. 3. changeColor() not called. 4. Template lacks property binding for background co
Which of the following is the correct order of steps followed by an Angular router? 1. Activates components. 2. Runs guards. 3. Resolves data. 4. Figures out router state from URL. 5. Manages navigation/repeats.
Which of the following statements about the Reactive form approach in Angular is not true?
Lisa wants to convert a date string 'YYYYMMDD' to 'MM/DD/YYYY'. Which pipes would be most appropriate? 1. DatePipe 2. UpperCasePipe 3. LowerCasePipe 4. SlicePipe 5. CustomPipe
Which of the following commands should John use to start the development server and view the 'Hello World' message on the screen?
Which of the following statements about loading an Angular module are correct? 1. On-demand loading is called lazy loading. 2. In lazy loading, modules are loaded asynchronously. 3. In lazy loading, modules must be imported into the application module.
What decorator is used to mark a class as an Angular service?