Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Which angular directive is added to an input tag and binds the value of the inpu

ID: 3830408 • Letter: W

Question

Which angular directive is added to an input tag and binds the value of the input element to a variable

ng-bind

ng-app

ng-model

ng-repeat

2 points   

QUESTION 14

Angular's _____ module allows setting up a list of links as might be used in a single page app.

$index

$http

$scope

$routeProvider

2 points   

QUESTION 15

In the name:value pairs that make up the JSON format, for example the word "color" in this object, {"color": "red"}, which of the following must be true of the name? Choose 2 answers.

It can be composed of any printable characters whatsoever

It cannot have any special characters except the underscore or the dollar sign.

It must not start with a number

It cannot start with an underscore

2 points   

QUESTION 16

Using jQuery, you would set the content of a paragraph element with an id = "p3" to say "Howdy" using _____.

$(p3).html("Howdy");

$(#p3).html("Howdy");

$(".p3").html("Howdy");

$("#p3").html("Howdy");

3 points   

QUESTION 17

Which angular directive, if added as an attribute to an HTML element, binds a variable to the innerHTML of that specific HTML element

ng-bind

ng-make

ng-app

ng-fix

2 points   

QUESTION 18

Ajax is a mix of several technologies, and works by using a built-in JavaScript object named the _____.

spinner_object

Ajax_object

XMLHttpRequest object

JSONparallel_object

2 points   

QUESTION 19

The _____ object holds the data and methods for the html section controlled by a controller.

$scope

$binder

$function

$route

2 points   

QUESTION 20

AngularJS subscribes to the _____ design pattern.

model-view-controller

parallel-wicket

line_spinner

factory

2 points   

QUESTION 21

The jQuery equivalent to window.onload() is _____.

$(document).ready()

$(document).load()

$(document).onload()

$(document).delay()

2 points   

QUESTION 22

By default an Ajax exchange is _____.

asynchronous

synchronous

2 points   

QUESTION 23

This jQuery code _____.

data = "color=orange";
url = "change.php";
$("#myDiv").load( url, data);

makes a POST request sending a color preference to a page named change.php.

makes a GET request sending a color preference to a page named change.php.

3 points   

QUESTION 24

"This jQuery code _____.

data = {color: "orange"};
url = "change.php";
$("#myDiv").load( url, data);

makes a POST request sending a color preference to a page named change.php.

makes a GET request sending a color preference to a page named change.php.

3 points   

QUESTION 25

The jQuery $(document).ready() handler _____.

ensures the contained code does not run until the DOM is available

automatically pops up an alert message to tell you when the document is ready.

causes code execution only when a button is clicked

2 points   

QUESTION 26

To use Angular routing, which of the following properly sets up the module?

var app = angular.module('mainApp', ['ngRoute']);

var app = angular.module('mainApp', 'ngRoute');

var app = angular.module('mainApp', function('ngRoute'));

2 points   

QUESTION 27

To use the AngularJS $http module, in your controller you need to add "$http" as a parameter to ____

in the module declaration itself.

the anonymous controller function that handles the call for data.

the config section of the module

2 points   

QUESTION 28

In Javascript, how would we assign the value entered in a textbox to a variable named x if the textbox had an id = 'age' ?

x = document.getElementByTag("textbox").value;

x = document.id("age").value;

x = document.attachElement("name").value;

x = document.getElementById("age").value;

2 points   

QUESTION 29

This code is _____.

var getPI = function () {return 3.14159; };

an anonymous function

a comprehension

a function of x

a boolean function

3 points   

QUESTION 30

Consider this code. What does the '/' mean?

app.config(function($routeProvider) {
$routeProvider .when('/', {
templateUrl : 'base.html',
controller : 'mainController'
});

it means 'none of the above'

it means any possible url

it means the default page of the app

it means return an error

3 points   

QUESTION 31

Which angular directive binds a JavaScript data structre to a repeating element like a HTML list, division, or HTML table and generates the HTML from that data structure.

ng-model

ng-app

ng-repeat

ng-bind

2 points   

QUESTION 32

Assume below that the variable named URL has been assigned a proper value. Which statement requests data and puts that data in a $scope variable named soups?

$http.get(URL).then(function(){ soups = soups.data;} );

$http(URL)then(function(items){$scope.soups = data;});

$http.get(URL).then(function(items){ $scope.soups = items.data; });

"$http.get(URL, function(data){soups = data;});"

3 points   

QUESTION 33

The jQuery equivalent to innerHTML is _____.

inner()

html()

add()

text()

2 points   

QUESTION 34

The JSON format is essentially a JavaScript data structure that has been converted into a single string.

True

False

2 points   

QUESTION 35

"By default, Ajax is restricted to requesting data only from the domain the requesting page originated from."

True

False

2 points   

QUESTION 36

"Some of the NOSQL databases, like MongoDB or CouchDB, store data is a format that is essentially the JSON format."

True

False

2 points   

QUESTION 37

jQuery often handles the differences among browser behaviors for you.

True

False

2 points   

QUESTION 38

JSON is a general purpose syntax for exchanging data in a string format.

True

False

2 points   

QUESTION 39

Ajax enables the user's browser to interact with your web server in a way that allows exchanging data without posting a whole complete page to the web server for each request.

True

False

2 points   

QUESTION 40

"Angular's $http service handles requests for exchanging data with the web server, and manages the conversion to and from JSON for you automatically."

True

False

2 points   

QUESTION 41

jQuery allows animating various HTML elements.

True

False

2 points   

QUESTION 42

"Templates cannot hold expressions, only individual variables."

True

False

2 points   

QUESTION 43

"The function that calls an asynchronous request ""blocks"" until the request is complete."

True

False

2 points   

QUESTION 44

"Routing is included in the version 1.4 AngularJS files, so you don't need to add an additional file."

True

False

2 points   

QUESTION 45

With this JavaScript code, how do you assign the population for KY to the variable p?

m = [
{state: "IN", population: 6.6 },
{state: "OH", population: 11.6},
{state: "KY", population: 4.4 },
{state: "TN", population: 6.5}
];

p = m[1].population + " million."

p = m[2].population + " million."

p = m[2][1] . " million."

p = m[1].population . " million."

p = m[0].population + " millio

ng-bind

ng-app

ng-model

ng-repeat

Explanation / Answer

The correct option for the 1st question is ng model .

Hence the answer to the 1st question is ng- model.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote