About AngularJs

  

Following are some of the multiple choice questions on the AngularJs with answers that will help the students in developing their knowledge.

AngularJs MCQ

1. Which of the following directive bootstraps AngularJS framework?

  • ng-init
  • ng-app
  • ng-controller
  • ng-bootstrap

2. What is the output of below code<div>{{ 'Hello! This is Angular Quiz' | uppercase | lowercase |titlecase }}</div>

  • hello! this is angular quiz
  • Hello! This Is Angular Quiz
  • HELLO! THIS IS ANGULAR QUIZ
  • Error -(Can't use multiple pipes for same element)

3. Which are the different Data Types supported by Typescript?

  • Boolean var bValue: boolean = false
  • Number var age: number = 16
  • String var name: string = "jon"
  • All of the above

4. Cons of SPA - Single Page Application

  • XSS
  • SEO
  • Lazy loading
  • Both a & b

5. Node JS use which javascript engine

  • Squirrel Fish
  • Bluma
  • V8
  • None of the above

6. Most used CSS frameworks are

  • Bootstrap
  • Semantic UI
  • SASS
  • Foundation

7. HTML is mainly used for creating static web page

  • True
  • False

8. PWA is type of

  • web architecture
  • web pattern
  • web application
  • Hybrid mobile app

9. Angular JS is Library or Framework?

  • Library
  • Framework

10. Javascript is ------------ Language

  • Programming
  • Scripting
  • Application
  • applet

11. What is the javascript runtime engine for Firefox browser?

  • Spider Monkey
  • Chakra
  • V8
  • Carakan

12. In ECMAScript, ECMA stands for

  • European Computer Machine Associations
  • European Computer Manufactures Association
  • European Client Manufactures Assembly

13. What are the types of directives

  • Component
  • Structural
  • Attribute
  • All of above

14. Which of the following is a valid AngularJS expression?

  • {{ 2 + 2 }}
  • { 2 + 2 }
  • (( 2 + 2 ))
  • { (2 + 2) }

15. Which of the following statements are true?

  • AngularJS controller maintains application data & behaviour using $scope
  • AngularJS controller can be created in separate JS file
  • AngularJS controller can be added into module
  • all

16. AngularJS needs data in JSON format to populate its model.

  • yes
  • no

17. In AngulsrJS HTML document is loaded and evaluated first in the browser. Mean while in AngularJS _________ ?

  • JavaScript file is loaded
  • The angular global object is created
  • Your JavaScript which registers controller functions is executed
  • All

18. Which of the following directive allows us to use form?

  • ng-app
  • ng-form
  • ng-controller
  • ng-bind

19. There is a controller which takes a single parameter. We call it . . . . . parameter.

  • $param
  • $scope
  • $control
  • $scont

20. Can an HTML page have multiple “ng-app” directive for bootstrapping multiple AngularJS application?

  • yes
  • no
  • none
  • all

21. AngularJS is a library?

  • true
  • false

22. Which of the following is true about ng-init directive?

  • ng-init directive initializes an AngularJS Application data.
  • ng-init directive is used to put values to the variables to be used in the application.
  • both
  • none

23. Have you started work on last homework?

  • Yes
  • No

24. What class shows that user still doesn't input anything?

  • ng-touched
  • ng-dirty
  • ng-pristine
  • ng-valid
  • ng-untouched

25. Difference between http and httpclient service in angular

  • http service converts the response to json by default
  • httpclient service converts the response to json by default
  • http service converts the response to xml by default
  • httpclient service converts the response to xml by default

26. When you import RouterModule in a feature module (not Root module) which function would you use?

  • forRoot()
  • forFeature()
  • forModule()
  • forChild()

27. Which type of binding uses the banana box [()]

  • Property Binding
  • Interpolation Binding
  • Two-way binding
  • Directive Binding

28. The minimum number of files you'll need to create an angular component

  • 1
  • 2
  • 3
  • 4

29. Are you required to create an app rounting Module in an angular Application?

  • TRUE
  • FALSE

30. What decorator is used to make a class a service?

  • Injector
  • Service
  • Injectable
  • Component

31. Do we need to declare the service in the Angular Module?

  • TRUE
  • FALSE

32. What does main.ts file bootstrap to?

  • App Component
  • App Module
  • App Routing Module
  • index.html

33. Where do we keep the images that we use in the application?

  • app
  • assets
  • environments
  • e2e

34. The callback functions of observable are

  • next, error
  • next
  • next , error, complete
  • next, complete

35. The output of http/httpclient service in angular is of type

  • Observable<type>
  • Promises<type>
  • Data<type>
  • Can be configured

36. Http service supports following operations

  • Get, Post , Delete
  • Get, Post, Put
  • Get, Put, Post , Delete
  • Get , Post

37. What is FormBuilder?

  • Class for generating reactive forms in run-time
  • Class for generating template-driven forms in run-time
  • Function for generating reactive forms in run-time
  • Function for generating template-driven forms in run-time

38. @Ouput() operator makes use of

  • Event Emitter
  • rxjs operator
  • promises
  • Data binding

39. Which statements about metadata in angular are true

  • Meta-data is the way for processing the class and the component.
  • It is used to decorate the class
  • All the decorator are used by the meta-data to attach variable to the component or module class.
  • All of the above

40. @Input() is used for sharing data between

  • from parent to child
  • from child to parent
  • both A and B
  • None of the above

41. Select the arrays included in the angular module

  • Bootstrap Array
  • Imports Array
  • Providers Array
  • All of the above

42. We can apply multiple attribute directives to a host element?

  • TRUE
  • FALSE

43. We can apply multiple structural directives to a host element?

  • TRUE
  • FALSE

44. Select all Structaral directives from below { (i) *ngIf } { (ii) *ngFor } { (iii) *ngClass } { (iv) *ngElse } { (v) *ngWhile } { (vi) *ngSwitch }

  • ii, iii, v
  • i, ii, iv
  • i, ii, vi
  • i, iii, v

45. Which directive substitutes the normal href property and makes it easier to work with route links in Angular?

  • RouterLink
  • RouterRend
  • RouterLike
  • RouterLayer

46. Which of the following is not built-in pipe in Angular?

  • DatePipe
  • CurrencyPipe
  • DataPipe
  • PercentPipe

47. I have created a custom pipe with name substr which takes start index, and end index as paramenters. A variable is declared in TS file as - let header = 'Angular Quiz';What is the code to display output as "Quiz"

  • {{ header | substr(8, 12) }}
  • {{ substr (header, 8, 12) }}
  • {{ header | substr:8:12 }}
  • None of the above

48. If I write <button (click) = "onClick ()"> in a template, I use?

  • interpolation
  • property binding
  • event binding

49. What does this syntax do? routerLink="/home"

  • It navigates to the component with a name matching the assigned string
  • It links a route to a service by matching the assigned string to a service class name
  • It links a route with data by matching the assigned string to a property name
  • It navigates to the component with a path matching the assigned string

50. Which tool allows you to manage the dependencies of a frontend project?

  • NodeJS
  • npm
  • TypeScript
  • webpack

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.