wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Web development through java quiz 7

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

AngularJS is perfect for _______.

a)

Create Single Page Applications

b)

Create Web Services

c)

Creating a Desktop Application

d)

None of these

2.

Which is the correct syntax to create a module?

a)

var variable_name = angular.module("app_name", []);

b)

var variable_name = angular.module("app_name", []);

c)

var variable_name = angular.module("app_name", []);

3.

Which prefix is used with the AngularJS directives?

a)

ag-

b)

aj-

c)

ng-

d)

All of the above

4.

Which directive initializes an AngularJS application?

a)

ng-init

b)

ng-app

c)

ng-application

d)

ng-model

5.

Which directive initializes application data?

a)

ng-application

b)

ng-init

c)

ng-model

6.

In the below given statement, "myApp" parameter refers to ____.

a)

JavaScript code in which the application will run

b)

a JSON file

c)

an HTML element in which the application will run

d)

SQL queries

7.

Which directive initializes an AngularJS application?

a)

ng-init

b)

ng-app

c)

ng-model

d)

ng-application

8.

Which directive repeats an HTML element?

a)

ng-repeat

b)

ng-repeats

c)

ng-model

9.

Write a statement with <div> element to initialize two variables (name and age)?

a)

<div ng-app="" ng-init="Name='Alex';Age=21">

b)

<div ng-app="" ng-init="Name:'Alex';Age:21">

c)

<div ng-app="" ng-init="Name='Alex',Age=21">

d)

<div ng-app="" ng-init="Name:'Alex',Age:21">

10.

Consider the below statement – what will be the output?

<div ng-app="" ng-init="values=[10, 20, 30]"> <p>The value is {{values[0]}} + {{values[2]}}</p> </div>

a)

The value is 40

b)

The value is Undefined

c)

The value is NaN

d)

The value is 10 + 30

11.

Which AngularJS filter orders an array by an expression?

a)

OrderBy

b)

orderby

c)

order

d)

orderBy

12.

The . . . . . decorator allows us to define the pipe name that is globally available for use in any template in the across application.

a)

pipeName

b)

Pipe

13.

Observables help you manage . . . . . . . . data.

a)

asynchronous

b)

synchronous

c)

None of above

14.

Where would you put it?

a)

In the Template

b)

In the Injectable decorator

c)

In the module

d)

In the Component

15.

How would you display a list of Employees on a webpage along with where they were in the list?

a)

Loop through and print the index and the employee

b)

Loop through and print the index

c)

Pass both the index and the employee to a web service

d)

Loop through and print the employees

16.

What is the decorator used for configuring your module class?

a)

@NgAngular

b)

@NgModule

c)

@NgApp

d)

None of the Above

17.

Which of the following is not a feature of Angular ?

a)

Multithread

b)

Components

c)

TypeScript

d)

Services

18.

Which method of $location service is used to get the current URL without any parameters?

a)

absPath()

b)

url()

c)

absUrl()

d)

path()

19.

Which method of $location service is used to get the search part of the current URL when called without any parameter?

a)

search()

b)

searchPath()

c)

ruleSearch()

d)

absSearch()

20.

AngularJS is entirely based on HTML and JavaScript?

a)

False

b)

True