AngularJS Тест Upwork

AngularJS directives are used in ___.

Model
View
Controller
Module

What can be injected as dependencies? (choose all that apply)
Note: There may be more than one right answer.

services
directives
run
filters
controllers are defined by a constructor function
animations
config

Which are the core directives of AngularJS?

ng-app − This directive defines and links an AngularJS application to HTML.
ng-model − This directive binds the values of AngularJS application data to HTML input controls.
ng-bind − This directive binds the AngularJS Application data to HTML tags.
All of the above

What is MVC?

MVC is name of an algorithm.
MVC is a software design pattern for developing web applications.
MVC is a software technique to optimize web application performance.  
None of the above.

What kind of data binding is used in AngularJS?

One way data binding
Two way data binding
Three way data binding

Which of the following code snippets is more efficient?
someModule.controller('MyController', ['$scope', 'dep1', 'dep2', function($scope, dep1, dep2) {
  ...
  $scope.aMethod = function() {
    ...
  }
  ...
}]);

someModule.controller('MyController', function($scope, dep1, dep2) {
  ...
  $scope.aMethod = function() {
    ...
  }
  ...
});

Both are equally efficient.
The second code is more efficient as it contains less code.
The first code is more efficient because it holds names of dependencies.
The second code is more efficient because it not contains additional an array.

Which design pattern is used in AngularJS?

MVVM
MVC
MVP
MVW

What is true with respect to angular.module?

angular.module is used to create AngularJS modules along with its dependent modules. NEWW
angular.module is primarily used to create application module.
Both of the above
None of the above.

AngularJS module can be created using ____.

angular.module();
var myModule = new module();
module.create();
angular.create();

Call angularjs service from simple JS following code?

angular.module('main.app', []).factory('MyService', ['$http', function ($http) {
    return new function () {
        this.GetName = function () {
            return "MyName";
        };
    };
}]);

angular.injector(['ng', 'main.app']).get("MyService").GetName();
angular.module('app.main').factory('MyService', ["$http", function ($http) {
    return new function () {
        this.GetName = function () {
            return "MyName";
        };
    };
}]);

Both of the above

None of the above

Which of the following is a valid AngularJS application definition?

var myApp = ng.module(‘myApp',[]); d-)
var myApp = angular.app(‘myApp',[]);
var myApp = angular.module(‘myApp',[]);
var myApp = ng.app(‘myApp',[]);

Which of the following isValid AngularJS Expression?

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

What is $rootScope?

$rootScope does’t exist
$rootScope is single root object scope for the app. All other scopes are descendant scope of the root scope.
$rootScope is single root object scope in each module. All other scopes are descendant scope of the root scope.
$rootScope and $scope are the same object. Developers decide what they will use.

You can invoke a directive by using the following examples? (choose all that apply)
Note: There may be more than one right answer.

<w3-test-directive></w3-test-directive>
<div w3-test-directive></div>
<div class="w3-test-directive"></div>
<-- directive: w3-test-directive -->
<!-- directive: w3-test-directive -->

A promise is an interface that deals with objects that are __ or __ filled in at a future point in time (basically, asynchronous actions)?

set, data
returned, data
returned, set
returned, get

Which of the following are methods in an instance of $q.defer() ?
Note: There may be more than one right answer.

finally
when
notify
then
reject
resolve

Which of the following is the correct syntax for using the $q.all method?
Note: There may be more than one right answer.

$q.all([promise1(),promise2]]).then((values) => {
...
});
``

```
$q.all("promise1", "promise2").then((values) => {
...
});
```

```
$q.all({"promise1": promise1(),"promise2": promise2()}).then((values) => {
...
});
```

Custom directives are used in AngularJS to _____ the functionality of HTML?

extend
integrate
render
connect
connect

Explain $q service, deferred and promises, Select a correct answer?

    Promises are post processing logics which are executed after some operation/action is completed whereas ‘deferred’ is used to control how and when those promise logics will execute.
    We can think about promises as “WHAT” we want to fire after an operation is completed while deferred controls “WHEN” and “HOW” those promises will execute.
    “$q” is the angular service which provides promises and deferred functionality.
    All of the above

How to use and register decorators in AngularJS?
Note: There may be more than one right answer.

$tempalte.decorator
$provide.decorator
provide.decorator
module.decorator

Pick the correct statement in connection to the ng-include directive?

It is used to embed HTML from an external file
It is used to embed JS from external files
Both of the above
None of the above

Which method of $routeProvider redirect to a specific page when no other route definition is matched?

when()
otherwise()
redirectTo()
default()

Which of the following provider can be used to configure routes?

$routeProvider
$url
$rulesProvider
None of the above.

Select a true statement regarding the rootrouter concept

The top level Router that interacts with the current URL location
Displays the Routing Components for the active Route. Manages navigation from one component to the next
Defines how the router should navigate to a component based on a URL pattern
An Angular component with a RouteConfig and an associated Router

How can you lowercase a given string named examplePattern?

{{ examplePattern filter : lowercase }}
{{ examplePattern | lowercase }}
{{ lowercase(examplePattern) }}
{{ examplePattern | filter : lowercase }}

If you want to observe the changes of full object $scope.myObj={one:1, two:2}, what way do you choose?

`$scope.$watch(‘myObj’, function(){ … })`
`$scope.$on(‘myObj’, function(){ … })`
`$scope.$watch(‘myObj’, function(){ … }, true)`
`$scope.$on(‘myObj’, function(){ … }, true)`

The Promise proposal dictates the following for asynchronous requests? (choose all that apply)
Note: There may be more than one right answer.

The Promise has a then function, which takes two arguments, a function to handle the “resolved” or “success” event, and a function to handle the “rejected” or the “failure” event
It is guaranteed that one of the two callbacks will be called, as soon as the result is available
Async requests return a promise instead of a return value
The Promise proposal is the basis for how AngularJS structures local

How to use AngularJS promises, read the example code?

controller('MyCtrl', function($scope, $q) {
  function longOperation() {
    var q = $q.defer();
    somethingLong(function() {
      q.resolve();
    });    
    return q.promise;
  }
  longOperation().then(function() {
});
})

controller('MyCtrl', function($scope, $q) {
   var lastUrl;
   var lastFileName
   return {
      createPdf(url, fileName){
          //do processing
          lastUrl = url;
          lastFileName = fileName
      },
      loadLastPdf(){
         //use lastUrl and lastFileName
      }
   }
})

Both of the above

None of the above

What is ng-hide directive used for?

Show a given control
Hide a given control
Both of the above
None of the above

What is the output of the following code:
$scope.firstName = «John»,
$scope.lastName = «Doe»
{{ firstName | uppercase }} {{ lastName }}

john doe
JOHN DOE
John Doe
JOHN Doe

Which of the following is not a type of an Angular service?

service
value
controller
provider
factory
constant

Angular loads into the page, waits for the page to be fully loaded, and then looks for ng-app to define its ___ boundaries?

web
pages
filter
template

What is $scope?

It transfers data between a controller and view.
It transfers data between model and controller.
It is a global scope in AngularJS.
None of the above.

Which of the following service is used to retrieve or submit data to the remote server?

$http
$XMLHttpRequest
$window
$get

Which of the following modules will help with routing in the Angular application?

angularRouter
ng-view-router
ngRoute
viewRouter

AngularJS applies some basic transformations on all requests and responses made through its $http service?
Note: There may be more than one right answer.

Request transformations If the data property of the requested config object contains an object, serialize it into JSON format.
Response transformations If an XSR prefix is detected, strip it. If a XML response is detected, deserialize it using a JSON parser.
Response transformations If an XSRF prefix is detected, strip it. If a JSON response is detected, deserialize it using a JSON parser.
None of the above

What are the services in AngularJS?

Services are singleton objects which are instantiated only once in app an are used to do the defined task.
Services are objects which AngularJS uses internally.
Services are not used in AngularJS.
Services are server side components of AngularJS.

What are the services in AngularJS?

Filters select a subset of items from an array and return a new array. Filters are used to show filtered items from a list of items based on defined criteria.
AngularJS come with several built-in services. For example $http service is used to make XMLHttpRequests (Ajax calls). Services are singleton objects which are instantiated only once in app.
Templates are the rendered view with information from the controller and model. These can be a single file (like index.html) or multiple views in one page using «partials».
All of the above

Which of the following methods make $scope dirty-checking?

`$watch, $watchCollection`
`$digest, $eval`
`$watch, $apply`
`$apply, $digest`

Which of the following is not valid feature for Angular templates?

Routes
Filters
Directives
Forms

Dynamically loadable DOM template fragment, called a , through a ?

view, model
view, route
view, template
view, render

Which Angular service simulates the 'console' object methods from Javascript?

Http
Log
Interpolate
Sce

What is Angular Expression, How do you differentiate between Angular expressions and JavaScript expressions?

Context : The expressions are evaluated against a scope object in Angular, while Javascript expressions are evaluated against the global window.
Forgiving: In Angular expression, the evaluation is forgiving to null and undefined whereas in JavaScript undefined properties generate TypeError or ReferenceError.
No Control Flow Statements: We cannot use loops, conditionals or exceptions in an Angular expression.
Filters: In Angular unlike JavaScript, we can use filters to format data before displaying it.
All of the above

Which of the following is true about lowercase filter?

Lowercase filter converts a text to lower case text.
Lowercase filter converts the first character of the text to lower case.
Lowercase filter converts the first character of each word in text to lower case.
None of the above

Which of the following is Angular E2E testing tool?

JsTestDriver
Jasmine
Nightwatch
Protractor

What is the output of the following code:
$scope.data = [1, 2, 3, 4, 5];
< span ng-repeat=»item in data» ng-if=»item > 5 && item < 10 «>{{ item }}< /span >

6 7 8 9 10
1 2 3 4 5
Nothing is output

What can be following validate data in AngularJS?

$dirty − states that value has been changed.
$invalid − states that value entered is invalid.
$error − states the exact error.
All of the above

AngularJS service can be created,registered,created in following different ways?
Note: There may be more than one right answer.

the factory() method
the value() method
the service() method
the provider() method
None of the above

ng-bind directive binds ___.

Data to model.
View to controller.
Model to HTML element.
Model to $scope.

What is the output of the following code?
< body ng-app=»myApp» >
< !— directive: my-directive — >
< /body>
var app = angular.module(«myApp», []);
app.directive(«myDirective», function() {
return {
replace : true,
template : «<h1>I got printed</h1>»
};
});

<h1 my-directive=»»>I got printed</h1>
Blank Screen
<h1>I got printed</h1>
<h1 class=»my-directive»>I got printed</h1>

What kind of filters are supported the inbuilt internationalization in AngularJS?

currency and date
currency, date and numbers
date and numbers
None of above

What is the output of the following code?
< div ng-app=»myApp» >
< h1>{{98 | myFormat}}< /h1>
< /div>
var app = angular.module(‘myApp’, []);
app.service(‘myAlter’, function() {
this.myFunc = function (x) {
return x+’%’;
}
});
app.filter(‘myFormat’,[‘myAlter’, function(myAlter) {
return function(x) {
return myAlter.myFunc(x);
};
}]);

98%
9.8
0.98
0.98%

How to use and register decorators in AngularJS?
Note: There may be more than one right answer.

$tempalte.decorator
$provide.decorator
provide.decorator
module.decorator

Pick the correct statement in connection to the ng-include directive?

It is used to embed HTML from an external file
It is used to embed JS from external files
Both of the above
None of the above

Which method of $routeProvider redirect to a specific page when no other route definition is matched?

when()
otherwise()
redirectTo()
default()

Which of the following provider can be used to configure routes?

$routeProvider
$url
$rulesProvider
None of the above.

Select a true statement regarding the rootrouter concept

The top level Router that interacts with the current URL location
Displays the Routing Components for the active Route. Manages navigation from one component to the next
Defines how the router should navigate to a component based on a URL pattern
An Angular component with a RouteConfig and an associated Router

How can you lowercase a given string named examplePattern?

{{ examplePattern filter : lowercase }}
{{ examplePattern | lowercase }}
{{ lowercase(examplePattern) }}
{{ examplePattern | filter : lowercase }}

If you want to observe the changes of full object $scope.myObj={one:1, two:2}, what way do you choose?

`$scope.$watch(‘myObj’, function(){ … })`
`$scope.$on(‘myObj’, function(){ … })`
`$scope.$watch(‘myObj’, function(){ … }, true)`
`$scope.$on(‘myObj’, function(){ … }, true)`

Which of the following correctly sets a height to 100px for an element?

angular.element(‘#element’).style.height = ‘100px’;
angular.element(‘#element’).css.height = 100;
angular.element(‘#element’).css(‘height’, 100);
angular.element(‘#element’).css(‘height’, ‘100px’);

How are AngularJS expressions  different from the JavaScript expressions?

Angular expressions can be added inside the HTML templates.
Angular expressions doesn’t support control flow statements (conditionals, loops, or exceptions).
Angular expressions support filters to format data before displaying it.
All of the above

Which of the following service components in Angular used to create XMLHttpRequest objects?
Note: There may be more than one right answer.

jsonpCallbacks
httpParamSerializer
httpParamSerializerJQLike
http
httpBackend
xhrFactory

AngularJS filters ____.

Format the data without changing original data.
Filter the data to display on UI.
Fetch the data from remote server.
Cache the subset of data on the browser.

What is the difference beetween watchGroup and watchCollection methods?

The `watchCollection` watch the single object properties, while `watchGroup` watch a group of expressions.
The `watchCollection` deeply watch the single object properties, while `watchGroup` watch a group of expressions.
The `watchGroup` deeply watch the single object properties, while `watchCollection` watch a group of expressions.
The `watchGroup` shallow watch the single object property, while `watchCollection` all object properties.

Using the following Custom AJAX property within AngularJs Service?

myApp.factory(‘GetBalance’, [‘$resource’, function ($resource) {
return $resource(‘/Service/GetBalance’, {}, {
query: { method: ‘GET’, params: {}, headers: { ‘beforeSend’: » } }, isArray: true,
});
}]);

myApp.factory(‘GetBalance’, [‘$resource’, function ($resource) {
return $resource(‘/Service/GetBalance’, {}, {
query: { method: ‘GET’, params: {}, }, isArray: true,
});
}]);

$.ajax({
type: «GET/POST»,
url: ‘http://somewhere.net/’,
data: data,
beforeSend: »,
}).done().fail();

All of the above

What are the filters in AngularJS, Choose the right answer?

Filters are the rendered view with information from the controller and model. These can be a single file (like index.html) or multiple views in one page using "partials".
Filters select a subset of items from an array and return a new array. Filters are used to show filtered items from a list of items based on defined criteria.
It is concept of switching views. AngularJS based controller decides which view to render based on the business logic.
All of the above

Which of the following is the correct syntax for using filters?

«`
<ul>
<li ng-repeat=»x in names || orderBy:’country’»>
{{ x.name + ‘, ‘ + x.country }}
</li>
</ul>
«`

«`
<ul>
<li ng-repeat=»x in names && orderBy:’country’»>
{{ x.name + ‘, ‘ + x.country }}
</li>
</ul>
«`

«`
<ul>
<li ng-repeat=»x in names | orderBy=’country’»>
{{ x.name + ‘, ‘ + x.country }}
</li>
</ul>
«`

«`
<ul>
<li ng-repeat=»user in users | orderBy:’country’»>
{{ user.name + ‘, ‘ user.country}}
</li>
</ul>
«`

The ng-model directive is used for ____.

One-way data binding.
Two-way data binding.
Binding view to controller.
None of the above.

What is $rootScope, Choose a True statement?

Scope is a special JavaScript object which plays the role of joining controller with the views. Scope contains the model data. In controllers, model data is accessed via $scope object. $rootScope is the parent of all of the scope variables.
Scope is a special Php object which plays the role of joining controller with the views. Scope contains the model data. In controllers, model data is accessed via $scope object. $rootScope is the parent of all of the scope variables.
Scope is a special ASP.Net object which plays the role of joining controller with the views. Scope contains the model data. In controllers, model data is accessed via $scope object. $rootScope is the parent of all of the scope variables.
All of the above

AngularJS directives can be written in HTML element as:

Tag
Attribute
Class name
All of the above.

Which of the following statement is True about provider?

provider is used by AngularJS internally to create services, factory etc.
provider is used during config phase
provider is a special factory method
All of the above

How you can Get AngularJs Service from Plain Javascript using the following code?

angular.service('messagingService', ['$rootScope', 'applicationLogService', 'dialogService', MessageService]);
angular.injector(['ng', 'error-handling']).get("messagingService").GetName();
angular.injector(['ng', 'error-handling', 'module-that-owns-dialogService' ]).get("messagingService").GetName();
All of the above

Which of the following code will clickCount incremented on button click and displayed?

<button ng-click="clickCount = clickCount + 1" >
Click me!
</button>
<span> count: {{clickCount}} </span>

<button on-click="clickCount = clickCount + 1" >
Click me!
</button>
<span> count: {{clickCount}} </span>

<button ng-click="clickCount = clickCount + 1" >
Click me!
</button>
<span> count: {clickCount} </span>

<button
on-click="clickCount = clickCount + 1" >
Click me!
</button>
<span> count: {clickCount} </span>

Which of the following is valid route definition?

app.config(function($ routeProvider) { $routeProvider
.on(«/1», {
templateUrl : «1.htm» })
.on(«/2», {
templateUrl : «2.htm»
})
.otherwise( {
templateUrl : «default.htm»
})
});

app.config(function($ routeProvider) { $routeProvider
.when(«/1», { templateUrl : «1.htm»
})
.when(«/2», { templateUrl : «2.htm»
})
.otherwise( {
templateUrl : «default.htm»
})
});

app.config(function($ routeProvider) { $routeProvider
.when(«/1», { templateUrl : «1.htm»
})
.when(«/2», { templateUrl : «2.htm»
})
.default( {
templateUrl : «default.htm»
})
});

app.config(function($routeProvider) { $routeProvider
.on(«/1», {
templateUrl : «1.htm» })
.on(«/2», {
templateUrl : «2.htm»
})
.default( {
templateUrl : «default.htm»
})
});

Which of the following is a valid http get request in AngularJS?

$http.request("someUrl")
.then(function(response) {
$scope.content = response.data;
});

$http({
url : "someUrl"
}).then(function succesFunction(response) {
$scope.content = response.data;
}, function errorFunction(response) {
$scope.content = response.statusText;
});

$http({
url : “someUrl"
data : "test"
}).then(function succesFunction(response) {
$scope.content = response.data;
}, function errorFunction(response) {
$scope.content = response.statusText;
});

$http.get(”method=get”,“someUrl”)
.then(function(response) {
$scope.content = response.data;
});

Which of the following directive bootstraps AngularJS framework?

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

AngularJS supports inbuilt internationalization following types of filters? (choose all that apply)
Note: There may be more than one right answer.

numbers
date
currency
None of the above

Which of the following is validation css class in AngularJS?

ng-valid
ng-invalid
ng-pristine
All of the above.

Which of the following service is used to handle uncaught exceptions in AngularJS?

$errorHandler
$exception
$log
$exceptionHandler

Out of the following which statement is equivalent to
< p ng-bind="foo ">< /p >

<p>{{foo}}</p>
<p {{foo}}></p>
<p>{{"foo"}}</p>
<p {{"foo"}}></p>

Which of the following module is required for routing?

angular.js
angular-route.js
angularRouting.js
route.js

Which of the following is true about ng-model directive?

ng-model directive binds the values of AngularJS application data to HTML input controls.
ng-model directive creates a model variable which can be used with the html page and within the container control having ng-app directive.
Both of the above.
None of the above.

How can you display the elements which contains given pattern of a collection?

<ul>
<li ng-repeat=»item in collection | contains:’pattern’ «>
{{ item }}
</li>
</ul>
<ul>

<li ng-repeat=»item in collection filter:’pattern’ «>
{{ item }}
</li>
</ul>
<ul>

<li ng-iterate=»item in collection | filter:’pattern’ «>
{{ item }}
</li>
</ul>

<ul>
<li ng-repeat=»item in collection | filter:’pattern’ «>
{{ item }}
</li>
</ul>

What is the output of the following code:
< div ng-app=»myApp» ng-controller=»myCtrl» >
< p ng-bind=»marks_obtained» ng-if=»(marks_obtained/total_marks)*100 >= 40″ > </ p>
< /div>
var app = angular.module(‘myApp’, []);
app.controller(‘myCtrl’, function($scope) {
$scope.marks_obtained= «60»;
$scope.total_marks = «100»;
});

Pass
60
NaN
0.60

Which way to hold dependencies in Angular component is more viable ?

The component can create the dependency, typically using the new operator.
The component can look up the dependency, by referring to a global variable.
The component can have the dependency passed to it, where it is needed.
The component can have JSON file with dependencies.

Which module is used for navigate to different pages without reloading the entire application?

ngBindHtml
ngHref
ngRoute
ngNavigate

In which component is it right way to use the additional libraries? Such as jQuery and etc.

controller
service
provider
directive

Which of the following is not a valid for Angular expressions?

Arrays
Objects
Function definition
Strings

What is deep linking in AngularJS?

Deep linking allows you to encode the state of application in the URL so that it can be bookmarked.
Deep linking is a SEO based technique.
Deep linking refers to linking various views to a central page.
None of the above.

Convenience methods are provided for most of the common request types, including?
Note: There may be more than one right answer.

JSONP
HEAD
TRACE
PUT

When are the filters executed in the Angular application?

After each `$digest`.
Before each `$digest`.
When their inputs are changed
When one of their inputs is undefined

How is it possible to emit some event?

`$emit()`
`$on()`
`$digest`
`$watch`

AngularJS supports i18n/L10n for the following filters out of the box?
Note: There may be more than one right answer.

date/time
factory
number
currency

What is the output of the following code:
$scope.x = 20;
{{ x | number:2 }}

20
20.0
20.00

Which of the following syntax is True of filter using HTML Template?

{( filter_expression filter : expression : comparator : anyPropertyKey)}
{filter_expression filter : expression : comparator : anyPropertyKey}
{{ filter_expression | filter : expression : comparator : anyPropertyKey}} https://www.codeseek.co/cyrilpanicker/using-filter-apos-filter-apos--ypjud http://www.c-sharpcorner.com/blogs/searching-data-in-angularjs
{ filter_expression | filter : expression : comparator : anyPropertyKey}

Which of the following custom filters will uppercase every third symbol in a string?

```
app.filter('myFormat', function() {
    return function(x) {
        var i, c, txt = "";
        for (i = 0; i < x.length; i++) {
            c = x[i];
            if (i % 3 == 0) {
                c = c.toUpperCase();
            }
            txt += c;
        }
        return txt;
    };
});
```

```
app.filter('myFormat', function() {
    return function(x) {
        var i, c, txt = "";
        for (i = 0; i < x.length; i++) {
            if (i % 3 == 0) {
                c = c.toLowerCase();
            }
            txt += c;
        }
        return txt;
    };
});
```

```
app.filter('myFormat', function() {
    return function(x) {
        var i, c, txt = "";
        for (i = 0; i < x.length; i++) {
            c = x[i];
            if (i % 3 == 0) {
                c = c.toUpperCase();
            }
            txt += c;
            return txt;
        }
      
    };
});
```

```
app.filter('myFormat', function() {
    return function(x) {
        var i, c, txt = "";
        for (i = 0; i < x.length; i++) {
            c = x[i];
            if (i % 3 == 0) {
               txt += c;
            }
            return txt.toUpperCase();
        }
      
    };
});
```

Which of the following is the best way to create a shallow copy of an object in Angular?

angular.copy
angular.extend
angular.identity
angular.injector

Which directive is responsible for bootstrapping the AngularJS application?

ng-init
ng-app
ng-model
ng-controller

Which of the following statements are true?

Expression cannot contain condition, loop or RegEx.
Expression cannot declare a function.
Expression cannot contain comma, void or return keyword.
All of the above.

Which of the following statements are true?

AngularJS controller contains business logic.
AngularJS controller can be created in separate JS file.
AngularJS controller can be added into module.
All of the above.

For the given url http://mysite.com:8080/urlpath?q=1 what is the value of the expression below?
var host = $location.host();

mysite.com
mysite.com:8080
http://mysite.com
http://mysite.com:8080

How can AngularJS promise be used for some objects? (Choose all that apply)
Note: There may be more than one right answer.

function getCurrentCall() {
var deferred = $q.defer();
if (!$scope.currentCall) {
$scope.currentCall = ‘foo’;
}
deferred.resolve();
return deferred.promise;
}

$scope.turnOffLocalAudio = function() {
getCurrentCall().then(function() {
if ($scope.currentCall.chat) {
$scope.currentCall.chat.offLocalAudio(false);
}
}, function() {
// unable to get CurrentCall
});
};

$scope.turnOffLocalAudio = function () {
if ($scope.currentCall) {
if ($scope.currentCall.chat) {
$scope.currentCall.chat.offLocalAudio(false);
}
}
}
All of the above

What is difference between ng-if and ng-show directives?

When using ng-if or ng-show directive, the hidden elements are placed in DOM with property display: none.
When using ng-show directive, the hidden elements are placed in DOM with property display: none. directive ng-if includes those elements in DOM, which are equal to the condition.
When using ng-if directive, the hidden elements are placed in DOM with property display: none. directive ng-show includes those elements in DOM, which are equal to the condition.
When using ng-if or ng-show directive, in DOM are placed those elements, which are equal to the condition.

Which of the following directives changes CSS-style of DOM-element?
Note: There may be more than one right answer.

`ng-class`
`ng-value`
`ng-style`
`ng-options`

Data binding in AngularJS is the synchronization between the and the ?

model, view
model, state
view, controller
model, controller

Which of the following directive allows us to use form?

ng-include
ng-form
ng-bind
ng-attach

How can using ngView directive?

To display the HTML templates or views in the specified routes.
To display the HTML templates.
To display the views in the specified routes.
To display iframes

What is the output for the following code?
’30’ + 35

65
NaN
3035

Which of the following statement True of templates in AngularJS?

In Angular, templates are written with HTML that contains Angular-specific elements and attributes. Angular combines the template with information from the model and controller to render the dynamic view that a user sees in the browser. In other words, if your HTML page is having some Angular specific elements/attributes it becomes a template in AngularJS.
Transfer data to and from the UI:Angular.js helps to eliminate almost all of the boiler plate like validating the form, displaying validation errors, returning to an internal model and so on which occurs due to flow of marshalling data.
Deep linking allows you to encode the state of application in the URL so that it can be bookmarked. The application can then be restored from the URL to the same state.
All of the above

How is it possible to pass parameters in $http get request?

in property data
in property params
in property url
in property resource

What type of the attribute directive data binding is used in code below?
var directive = function(){
return {
scope: {
myParam: ‘@’
}
}
}

Isolate scope one way string binding. Parent changes affect child, child changes doesn’t affect parent
Isolate Scope two way object binding. Parent changes affect child and child changes affect parent
Isolate scope object and object literal expression binding
Isolate scope function expression binding

Do I need to worry about security holes in AngularJS?
Note: There may be more than one right answer.

Like any other technology, AngularJS is not impervious to attack. Angular does, however, provide built-in protection from basic security holes including cross-site scripting and HTML injection attacks. AngularJS does round-trip escaping on all strings for you and even offers XSRF protection for server-side communication.
AngularJS was designed to be compatible with other securit

AngularJS Тест Upwork 2019