Angular Multiple Choice Questions

  • 1) Which of the following operators is used to transform the data in an Angular HTTP response?
  • 2) Which of the following operators is used to handle errors in Angular HTTP requests?
  • 3) How do you make an HTTP request in Angular using the HttpClient module?
  • 4) Which of the following HTTP request methods is used to retrieve data from a server in Angular?
  • 5) What is the Angular HttpClient module used for?
  • 6) How do you create a new Angular Service?
  • 7) What is the purpose of the providedIn property in the @Injectable decorator?
  • 8) How do you inject a service into a component in Angular?
  • 9) What is the purpose of a provider in Angular?
  • 10) What is Dependency Injection in Angular?
  • 11) What is an Angular Service?
  • 12) How do you use an Angular Directive in a template?
  • 13) How do you create a custom Angular Directive?
  • 14) Which of the following is an example of an Angular Attribute Directive?
  • 15) What is the purpose of an Angular Attribute Directive?
  • 16) Which of the following is an example of an Angular Structural Directive?
  • 17) What is the purpose of an Angular Structural Directive?
  • 18) What is an Angular Directive?
  • 19) Which of the following is used to handle nested routes in Angular?
  • 20) Which of the following is used to retrieve route parameters in Angular?
  • 21) Which of the following is used to pass route parameters in Angular?
  • 22) Which of the following is used to navigate to a route in Angular?
  • 23) Which of the following is used to define a default route in Angular?
  • 24) Which of the following is used to define a route in Angular?
  • 25) Which of the following is true about Angular Routing?
  • 26) What is Angular Routing?
  • 27) Which of the following syntaxes is used for two-way binding in Angular?
  • 28) Which of the following is true about two-way binding in Angular?
  • 29) Which of the following is true about event binding in Angular?
  • 30) Which of the following is true about property binding in Angular?
  • 31) Which of the following is true about interpolation in Angular?
  • 32) Which of the following types of data binding is used to update the view with user input?
  • 33) Which of the following types of data binding is unidirectional?
  • 34) What is data binding in Angular?
  • 35) What is the purpose of the "ViewChild" decorator in Angular?
  • 36) What is the purpose of the "ngOnDestroy" method in a component?
  • 37) What is the purpose of the "ngOnChanges" method in a component?
  • 38) What is the purpose of the "ngOnInit" method in a component?
  • 39) Which of the following is not a valid way to use event binding in a component template?
  • 40) Which of the following is not a valid way to use property binding in a component template?
  • 41) What is the purpose of the "templateUrl" property in a component's metadata?
  • 42) What is the purpose of the "selector" property in a component's metadata?
  • 43) Which of the following is not a valid way to create a component in Angular?
  • 44) What is a component in Angular?
  • 45) What is Angular?
  • 46) What is the latest version of Angular?
  • 47) Which of the following is not a core concept of Angular?
  • 48) Which directive is used to bind a value to an input element?
  • 49) Which of the following is not a valid lifecycle hook in Angular?
  • 50) Which operator is used to handle asynchronous data in Angular?
  • 51) Which module is required to use the ngFor directive?
  • 52) Which of the following is not a valid way to pass data to a child component in Angular?
  • 53) What is the purpose of the ng-container element in Angular?
  • 54) Which of the following is not a valid way to create a service in Angular?
  • 55) Which of the following is not a valid way to use dependency injection in Angular?
  • 56) Which of the following is not a valid way to create a route in Angular?
  • 57) The purpose of the providers array of an Angular module is to define the set of:
  • 58) What command will create a new Angular app with a root routing module?
  • 59) You apply a style selector in a component's CSS file. Which matching elements will be affected?
  • 60) How would you write code to modify the response from an http.get ?
  • 61) Where would the following code likely be found in an Angular application? routerLink="/crisis-center"
  • 62) What is a routerOutlet?
  • 63) According to the Angular Style Guide, what type of code should a component delegate to a service?
  • 64) How do you load an NgModule into its own bundle?
  • 65) What advantage does AOT give your app with regard to compilation?
  • 66) Which is the correct command to create a component named CustomerDetailComponent with the CLI (with this exact casing)?
  • 67) What is the purpose of FormBuilder?
  • 68) Which Angular CLI flag will not generate unit tests for a component?
  • 69) Which of the following will map the name of an input parameter "userData" to a field named "users"?
  • 70) When using FormBuilder, how are validation rules specified?
  • 71) How does Angular 4 improved error handling, when an error is caused by something in a template?
  • 72) Observables help you manage . . . . . . . . data.
  • 73) Where would you put it?
  • 74) How would you display a list of Employees on a webpage along with where they were in the list?
  • 75) If you chain multiple pipes together, they are executed
  • 76) The number pipe is location sensitive, which means that the same format argument will produce differently formatted results based on the . . . . . . .
  • 77) How would you retrieve a list of items from a server's URL?
  • 78) Which of the following is not built-in pipe in Angular?
  • 79) How would you debug and evaluate the response of the http.get function (using HttpClient) using a debugger?
  • 80) What does this syntax do? routerLink="/crisis-center"
  • 81) Which of the following option is correct about tsconfig.json?
  • 82) To start working with Angular 2, we need to install the _____________components.
  • 83) Which of the following is not a feature of Angular 2?
  • 84) Needs cleanup step before compiling
  • 85) Which of the following option is using Angular 2 to detect changes.
  • 86) Which of the following service has Angular 2, that allows us to dynamically load a component in a certain position on the page?
  • 87) Which of the following is not a hook in Angular 2 application life cycle.
  • 88) Which of the following filter is used to convert input to all uppercase?
  • 89) Interpolation in angular 2 is done using
  • 90) Which of the following is the correct way to apply a filter?
  • 91) Which file is responsible for startup of angular 2 project ?
  • 92) What is used .angular-cli.json
  • 93) What is the decorator used for configuring your module class?
  • 94) Which angular decorator allows us to define the pipe name that is globally available for use in any template in the across application?
  • 95) RxJS can be used for?
  • 96) Router is part of which of the following module?
  • 97) Which of the following is not a hook application life cycle?
  • 98) What does AOT stand for?
  • 99) What is .subscribe?
  • 100) Which of the following is correct about TypeScript?