AngularJS Directives

Computer Science and Engineering > AngularJS

Get ready for your AngularJS directives MCQ exam with our comprehensive set of multiple-choice questions! Test your knowledge on directive-based AngularJS concepts and assess your understanding of AngularJS directives in a quiz format. Our AngularJS directives quiz is designed to cover various aspects of AngularJS directives and help you evaluate your level of expertise. Take our AngularJS directives test now and boost your confidence for the upcoming exam! ➲ AngularJS Directives - Quiz


  • A It is used for registering DOM listeners as well as instance DOM manipulation. It is executed once the template has been cloned.
  • B It runs end-to-end tests that are also written in JavaScript and run with node.
  • C It is to bind the HTML tags (input, select, textarea) to Angular Application Data.
  • D It refers to the application model, acts like glue between application controller and the view. It can watch expressions and propagate events.
  • A ng-controller
  • B ng-app
  • C ng-init
  • D ng-model
  • A True
  • B False
  • A { (2 + 2) }
  • B { 2 + 2 }
  • C (( 2 + 2 ))
  • D {{ 2 + 2 }}
  • A ng-init directive initializes an AngularJS Application data
  • B ng-init directive is used to put values to the variables to be used in the application
  • C Both the options
  • D None of the options
  • A Any controller and directive
  • B None of the options
  • C Any controller
  • D Any controller or directive, filter or even inside the services
  • A CSS
  • B Element directives
  • C Attribute
  • D All the options mentioned
  • A
    
    <select ng-model=""> <option ng-repeat="x in cars">{{x.model}}</option> </select> <h1>You selected: {{}}</h1>
    
  • B
    
    <select ng-model="selectedCar"> <option ng-repeat="x in cars">{{x.model}}</option> </select> <h1>You selected: {{selectedCar}}</h1>
    
  • C
    
    <select ng-model="selectedCar"> <option ng-repeat="x in cars">{{x.model}}</option> </select> <h1>You selected: {{selectCar}}</h1>
    
  • A ng-app
  • B ng-state
  • C ng-model
  • D ng-bind
  • A
    
    {{count=count+1}}
    
  • B
    
    {{count++}}
    
  • C
    
     <ng-dblclick="count = count + 1" ng-init="count=0">
    
  • D
    
    <ng-dblclick="count = count + 1" ng-init="count=0">
    
    AND {{count=count+1}}
    
  • A ng-if applies the CSS property display: none; to the elements and ng-show+ng-hide removes the HTML element completely from the DOM
  • B ng-if removes the HTML element completely from the DOM, whereas the ng-show + ng-hide just applies the CSS property display: none; to the elements.
  • C Both performs the same function
  • A ng-switch
  • B ng-cloak
  • C ng-model
  • D ng-disabled
  • A ng-repeat
  • B ng-controller
  • C ng-include
  • D ng-if
  • A angular.module();
  • B var myModule = new module();
  • C angular.create();
  • D module.create();
  • A AngularJS application mainly relies on controllers to control the flow of data in the application.
  • B A controller is a JavaScript object containing attributes/properties and functions.
  • C ng-controller directive tells AngularJS what controller to use with this view.
  • D All the options