Angular 4 Questions - Angular 4 Quiz (MCQ)
Categories: Angular Angular JS
Angular 4 Questions - Angular 4 Quiz (MCQ)
- The controller takes the single parameter
- $control
- ^scope
- $scope
- None of the above
- Angular 1.x is written in
- C++
- Java
- Typescript
- Javascript
3. How does Angular 4 improve error handling, when an error is caused by something in a template?
- By enabling TypeScript's StrictNullChecks
- By creating flattened versions of Angular modules
- By generating source maps in terms of original template
- None of the mentioned
2. The . . . . . decorator allows us to define the pipe name that is globally available for use in any template in the across application.
- pipeName
- pipeDeco
- Pipe
- None
3. Observables help you manage . . . . . . . . data.
- synchronous
- asynchronous
- Both asynchronous & synchronous
- None of above
4. Where would you put it?
- In the Component
- In the Template
- In the Injectable decorator
- In the module
5. How would you display a list of Employees on a webpage along with where they were in the list?
- Loop through and print the index
- Loop through and print the employees
- Loop through and print the index and the employee
- Pass both the index and the employee to a web service
6. If you chain multiple pipes together, they are executed
- in parallel
- LIFO order
- in the order in which you specify them
- None of above
7. We can subscribe to an observable using the . . . . . . . . The benefit of this is that Angular deals with your subscription during the lifecycle of a component. Angular will automatically subscribe and unsubscribe for you.
- sync pipe
- async var
- async pipe
- syn var
8. The number pipe is location-sensitive, which means that the same format argument will produce differently formatted results based on the . . . . . . .
- user's format setting
- user's currency setting
- user's locale setting
- All of above
9. How would you retrieve a list of items from a server's URL?
- Create a URL transaction
- Use the HTTP get method
- Create a get SQL statement
- Use an HTTP package
10. Which of the following is not built-in pipe in Angular?
- DatePipe
- CurrencyPipe
- DataPipe
- PercentPipe
Answer:
1. (c), 2. (d), 3. (b), 4. (c), 5. (c), 6. (c), 7. (c), 8. (c), 9. (a), 10. (c)