Header Ads Widget

BCA Information

- AngularJS Modules, Controller, View and Scope

 1. What is MVC (Mode View Controller)? 

  a. It is a services for Java built function

  b. It is marker for DOM elements

  c. It is a software design pattern for developing web applications 

  d. None of the above

 2 Which of the following is valid for AngualarJS module 

  a. var app = angular.module(["myApp","param");

  b. var app = angular.module("myApp", []);

 c. var app = angular.module();

 d. var app = angular.module("myApp"); 

  3 What angular function is used to manually start up an angular application?

     a. angular.bootstrap 

    b. angular.element 

   c.angular.copy

   d.None of the above

4.Which of the following service(s) will be invoked by the controller?

a)   $scope
b)   $http
c)   $object constructor
d)   $this

5.$rootScoperefers to an object which is accessible from everywhereof theapplication.

a)   True
b)   False

 6.  $rootScope is created with ___
a)   ng-controller
b)   ng-app
c)   ng-init

 7.A controller is a JavaScript object containing ___

a)   Attributes
b)   Properties
c)   Functions
d)   All of the above

8. Which is the correct syntax of creating AngularJs controller?

a) 
var app = angular.module('myApp', []);
app.controller(
'myCtrl', function($scope) {
 
});


b)    
var app=angular.app('myApp', []);
app.controller(
'myCtrl', function($scope) {
 
});
c)   var app = angular.module('myApp', []);
app.controller(
function($scope) {
 
});
9.    Scope contains the ___?
a)   model data
b)   JavaScript Objects
c)   variables 

10.Which is/are the characteristics of scope object?

a)   Scopes provide APIs ($watch) to observe model.
b)   Scopes can be nested to limit access to the properties.
c)   It provides context against the expression to be evaluated.
d)   All of the above

 

11.Controller, which is the JavaScript function that ___ the data?

a)   Makes
b)   Changes
c)   Removes
d)   All of the above



12.Which of the following service(s) will be invoked by the controller?

a)   $scope
b)   $http
c)   $object constructor
d)   $this
t constructor
d)   $this

13.Which directive defines the application controller?

a)   ng-model
b)   ng-ctrl
c)   ng-controller

14.AngularJS controllers control ___of AngularJS applications.

a)   the data
b)   thefunction
c)   thevariable


Post a Comment

0 Comments

Popular Posts

Visual Basic 6.0 Program
Node js practical