WorksheetsWeb development through java quiz 7
Total questions: 20
Worksheet time: 10mins
AngularJS is perfect for _______.
Create Single Page Applications
Create Web Services
Creating a Desktop Application
None of these
Which is the correct syntax to create a module?
var variable_name = angular.module("app_name", []);
var variable_name = angular.module("app_name", []);
var variable_name = angular.module("app_name", []);
Which prefix is used with the AngularJS directives?
ag-
aj-
ng-
All of the above
Which directive initializes an AngularJS application?
ng-init
ng-app
ng-application
ng-model
Which directive initializes application data?
ng-application
ng-init
ng-model
In the below given statement, "myApp" parameter refers to ____.
JavaScript code in which the application will run
a JSON file
an HTML element in which the application will run
SQL queries
Which directive initializes an AngularJS application?
ng-init
ng-app
ng-model
ng-application
Which directive repeats an HTML element?
ng-repeat
ng-repeats
ng-model
Write a statement with <div> element to initialize two variables (name and age)?
<div ng-app="" ng-init="Name='Alex';Age=21">
<div ng-app="" ng-init="Name:'Alex';Age:21">
<div ng-app="" ng-init="Name='Alex',Age=21">
<div ng-app="" ng-init="Name:'Alex',Age:21">
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>
The value is 40
The value is Undefined
The value is NaN
The value is 10 + 30
Which AngularJS filter orders an array by an expression?
OrderBy
orderby
order
orderBy
The . . . . . decorator allows us to define the pipe name that is globally available for use in any template in the across application.
pipeName
Pipe
Observables help you manage . . . . . . . . data.
asynchronous
synchronous
None of above
Where would you put it?
In the Template
In the Injectable decorator
In the module
In the Component
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 and the employee
Loop through and print the index
Pass both the index and the employee to a web service
Loop through and print the employees
What is the decorator used for configuring your module class?
@NgAngular
@NgModule
@NgApp
None of the Above
Which of the following is not a feature of Angular ?
Multithread
Components
TypeScript
Services
Which method of $location service is used to get the current URL without any parameters?
absPath()
url()
absUrl()
path()
Which method of $location service is used to get the search part of the current URL when called without any parameter?
search()
searchPath()
ruleSearch()
absSearch()
AngularJS is entirely based on HTML and JavaScript?
False
True
