Angular JS

  1. What are views in Angular JS?
    • Views render the user interface:
    •  * Contain HTML and CSS
    •  * Bind to data provided by a
    • controller via the $scope object
    •  * Use directives to enhance HTML
    • and render data
  2. Describe what 'scope' is in Angular JS;
    Image Upload 2
  3. What AngularJS directive is used to bind data?
    Image Upload 4
  4. In what year was AngularJS version 1 released?
    2012
  5. AngularJS is a JavaScript framework. It can be added to an HTML page with a _______ tag.




    B) <script>
  6. The _______ directive binds the value of HTML controls (input, select, textarea) to application data.



    A)  ng-model
  7. The _________ directive defines an AngularJS application.



    B)  ng-app
  8. The ________ directive binds application data to the HTML view.



    B)  ng-bind
  9. The _______ directive tells AngularJS that the <div> element is the "owner" of an AngularJS application.



    B)  ng-app

    The ng-app directive tells AngularJS that the <div> element is the "owner" of an AngularJS application.
  10. The _______ directive binds the value of the input field to the application variable name.



    A)  ng-model

    The ng-model directive binds the value of the input field to the application variable name.
  11. The ______ directive binds the innerHTML of the <p> element to the application variable name.

    <div ng-app=""> 
        <p>Name: <input type="text" ng-model="name"></p> 
        <p ng-bind="name"></p>
    </div>



    B)  ng-bind

    The ng-bind directive binds the innerHTML of the <p> element to the application variable name.
  12. The ______ directive initialize AngularJS application variables.

    <div ng-app="" ng-init="firstName='John'">
         <p>The name is <span ng-bind="firstName"></span></p>
    </div>
    ng-init

    The ng-init directive initialize AngularJS application variables.
  13. AngularJS _________ define applications:

    AngularJS Modulevar app = angular.module('myApp', []);



    A) Modules

    AngularJS modules define applications.
  14. AngularJS controllers control applications:

    AngularJS Controllerapp.controller('myCtrl', function($scope) {   
         $scope.firstName= "John";      
         $scope.lastName= "Doe";
    });



    B) Controllers

    AngularJS controllers control applications.
  15. T/F:  AngularJS expressions are much like JavaScript expressions: They can contain literals, operators, and variables.

    A) True
    B) False
    A) True

    AngularJS expressions are much like JavaScript expressions: They can contain literals, operators, and variables.

    Example {{ 5 + 5 }} or {{ firstName + " " + lastName }}
  16. T/F:  Like JavaScript expressions, AngularJS expressions cannot be written inside HTML.

    A) True
    B) False
    B) False

    Unlike JavaScript expressions, AngularJS expressions can be written inside HTML.
  17. T/F:  AngularJS expressions do not support conditionals, loops, and exceptions, while JavaScript expressions do.

    A) True
    B) False
    A) True

    AngularJS expressions do not support conditionals, loops, and exceptions, while JavaScript expressions do.
  18. T/F: Like JavaScript expressions, AngularJS expressions cannot contain literals, operators, and variables.

    A) True
    B) False
    B) False

    Like JavaScript expressions, AngularJS expressions CAN contain literals, operators, and variables.
  19. T/F: AngularJS expressions support filters, while JavaScript expressions do not.

    A) True
    B) False
    A) True

    AngularJS expressions support filters, while JavaScript expressions do not.
  20. Review Point

    AngularJS Modules
    • An AngularJS module defines an application.
    • The module is a container for the different parts of an application.
    • The module is a container for the application controllers.
    • Controllers always belong to a module.
  21. A module is created by using the AngularJS function _________________.
    angular.module

    Example:

    • <div ng-app="myApp">...</div>
    •      <script>
    •           var app = angular.module("myApp", []); 
    •      </script>
  22. What is an Angular directive and what is it used for?
    AngularJS directives are extended HTML attributes with the prefix ng- . The ng-app directive initializes an AngularJS application. The ng-init directive initializes application data. The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
Author
caldreaming
ID
314497
Card Set
Angular JS
Description
Angular JS Study
Updated