Angular MCQ

AngularJS is perfect for single-page applications (SPAs).

  • AngularJS is a JavaScript framework. It can be added to an HTML page with a <script> tag.
  • Angular JS extends HTML attributes with Directives and binds data to HTML with expressions.
  • AngularJS extends HTML with ng-directives.
  • The ng-app directive defines an AngularJS application.
  • The ng-model directive binds the value of HTML controls to application data.
  • The ng-bind directive binds application data to the HTML view.
  • AngularJS directives are HTML attributes with an ng prefix.
  • The ng-directive initializes AngularJS application variables.
  • The ng-controller directive defines the controller.


Useful Resources

  1. Difference Between Angular and AngularJS
  2. Angular Interview Questions and Answers
  3. AngularJS Interview Questions
  4. Angular 8 Interview Questions
  5. Angular Vs React
  6. Angular JS Projects

Angular MCQs

1. 

To detect changes in the angular 2 project which of the following is used?

zone.js

scope.js

zones.js

zone$,js

2. 

Choose whether true or false:  AngularJS bootstrap itself during the config phase.

True

False

3. 

How is interpolation in angular 2 done?

{{{}}}

{{}}

{{|var}}

!!!!

4. 

Module created by using AngularJS function is known as

module()

mod()

Angular module()

mdl()

5. 

Most used CSS frameworks are ________

SASS

Semantic UI

Bootstrap

Foundation

6. 

On which of the types of components can a custom derivative be created?

Attribute

element directives

CSS

All of the above

7. 

State whether true or false:  AngularJS provides reusable components

True

False

8. 

State whether true or false: $https Services used to make an Ajax call to the server.

True

False

9. 

State whether true or false: $routeprovider is a module.

True

False

10. 

The functionality of angular controllers in the application is

an angular controller is used for displaying the data

an angular controller is used for controlling the data

both a and b

None of the above

11. 

The router is a part of which of the following given models?

@angular/router

@angular/core

Both a and b

None of the above

12. 

The syntax used to create a module in AngularJS is:

module(“app”,[])

var myModule=angular.module();

var myModule = new Module();

None of the above

13. 

The total $RootScope an AngularJS application can have is?

0

1

2

3

14. 

Choose whether true or false: We can apply multiple structural directives to a host element.

True

False

15. 

What can RxJS be used for?

Server-side

Browser

Both a and b

None of the above

16. 

What is the functionality of the @input decorator

Share data from child component to parent

use a service

use event  binding

share data from parent component to child

17. 

What is the functionality of the @output decorator?

Add OptionShare data from child component to parent1

use a service

use event  binding

share data from the parent component to a child

18. 

Which decorator is used for configuring model class

@NgApp

@NgModule

Both a and b are correct

None of the above

19. 

Which decorator is used to make a class a service?

Injectable

Component

Server

injector

20. 

Which function is used to import RouterModule in a feature module?

forRoot()

forModule()

forFeature()

forChild()

21. 

Which of the following can be used as a prefix for directive?

ng-

data-

Both a and b

None of the above

22. 

Which of the following components is the one which can be injected as a dependency in Angular JS?

Factory

Constant

Application module

Value

23. 

Which of the following is not a feature of angular 2?

Typescript

multi-thread

Components

services

24. 

Which of the following is used to retrieve a list of items from a server’s URL?

Using the http get method

using an HTTP package

create a get SQL  statement

create a URL transaction

25. 

Who is the father of AngularJS?

Misko Hevery

Brad Green

Mike Adams

Adam a bronze

26. 

Choose the correct statement about the lowercase filter.

it is a function that takes text as input

the lowercase filter converts a text to lowercase text

both a and b

none of the above

27. 

Among the following which can be used to write AngularJS directives

Attribute

class name

Tag

all of the above

28. 

Among the following which is not built-in a pipe in angular?

CurrencyPipe

DataPipe

PercentPipe

none of the above

29. 

Among the following, on which architectural pattern is AngularJS based?

Decorator pattern

Observer pattern

MVVM architecture pattern

MVC architecture pattern

30. 

Angular CLI stands for ____________

Angular command-line interceptor

Angular command line

Angular command-line interface

Angular command-line user interfaces

31. 

AngularJS is a ____

Java framework

JavaScript framework

HTML framework

SQL framework

32. 

AngularJS is perfect for?

MPAs

DPAs

CPAs

SPAs

33. 

AngularJS was developed by which company?

Facebook

Google

Angular

Netflix

34. 

AOT stands for ________

Angular Object Templates

Ahead of Time compilation

Both a and b

None of the above

35. 

Choose the advantage of Angular JS among the following.

it provides reusable components

it uses dependency injection and makes use of separation of concerns

it is unit-testable

all of the above

36. 

Choose the correct definition of deep thinking in AngularJS

Deep linking refers to Linking various views to the main page

Deep linking allows you to encode the state of an application in the URL so that it can be bookmarked

Deep linking is an SEO based technique

all of the above

37. 

Choose the correct definition of routerOutlet.

A decorator defines the template to display when a route is activated

a directive defined in the HTML indicating where the route’s view should display

A directive defined in the HTML identifying the route to activate

A property of component class used to activate a route

38. 

Choose the correct definition of the view in MVC.

View is responsible for displaying all or a portion of data to the user

View is responsible to act and process the data

View represents the database view

none of the above

39. 

Among the following choose the one which is responsible for the startup of the angular 2 projects.

app.ts

main.ts

index.js

angular.cli.json

40. 

Choose the correct syntax for writing AngularJS expression.

[expression]

{{expressions}}

{{{expressions}}}

{expressions}

41. 

Choose the definition of transpilers.

Converts source to the library

Convert source to source and then to the library

source to source compiler

all of the above

42. 

Choose the directive which is used to find the values of HTML controls to application data.

ng-model

ng-init

ng-app

ng-hide

43. 

Choose the filter which is used to convert the input to all uppercase

toUpper

upper

uppercase

None of the above

44. 

Choose the functionality of.angular-cli.json  among the following.

used to configure angular 2 project

used to install required  project packages

used to link external files

None of the above

45. 

Choose the incorrect AngularJS filter.

orderby

email

currency

lowercase 

46. 

Choose the incorrect hook application lifecycle.

noOnInit

ngViewStart

ngOnChanges

None of the above

47. 

Choose the reactor which is used to bind the application data to the HTML view in AngularJS.

ng-bind directive

ng-model directive

ng-init directive

ng-app directive

48. 

Choose the valid AngularJS expression.

{(2+2)}

{2+2}

{{2+2}}

((2+2))

49. 

Choose whether true or false:  Angular JS is completely based on HTML and JavaScript.

True

False

50. 

Choose whether true or false: -ng-bind binding Angular JS application data to HTML tags.

True

False

Get Placed at Top Product Companies with Scaler Hide