Create New Post

AngularJS MCQs - 1

  1. What does MVC stand for in AngularJS architecture?

    • A) Model View Controller
    • B) Module View Component
    • C) Multi View Control
    • D) Model View Container

    Answer: A) Model View Controller

  2. Which directive is used to bind the application data to the HTML view in AngularJS?

    • A) ng-model
    • B) ng-bind
    • C) ng-app
    • D) ng-repeat

    Answer: B) ng-bind

  3. What is the purpose of ng-app directive in AngularJS?

    • A) It declares the root element of the AngularJS application.
    • B) It defines a new module in AngularJS.
    • C) It specifies the AngularJS version being used.
    • D) It initializes the AngularJS application.

    Answer: A) It declares the root element of the AngularJS application.

  4. Which AngularJS service is used for making HTTP requests?

    • A) $http
    • B) $ajax
    • C) $request
    • D) $fetch

    Answer: A) $http

  5. What is the purpose of ng-controller directive in AngularJS?

    • A) It defines a new controller in AngularJS.
    • B) It initializes the AngularJS application.
    • C) It binds the application data to the HTML view.
    • D) It specifies the AngularJS version being used.

    Answer: A) It defines a new controller in AngularJS.

  6. What does $scope in AngularJS represent?

    • A) It represents the DOM elements in the AngularJS application.
    • B) It represents the controllers in the AngularJS application.
    • C) It represents the global scope of the AngularJS application.
    • D) It represents the data model in the AngularJS application.

    Answer: D) It represents the data model in the AngularJS application.

  7. Which directive is used for two-way data binding in AngularJS?

    • A) ng-model
    • B) ng-bind
    • C) ng-repeat
    • D) ng-show

    Answer: A) ng-model

  8. What is the purpose of ng-repeat directive in AngularJS?

    • A) It defines a new controller in AngularJS.
    • B) It repeats a set of HTML elements for each item in a collection.
    • C) It initializes the AngularJS application.
    • D) It specifies the AngularJS version being used.

    Answer: B) It repeats a set of HTML elements for each item in a collection.

  9. Which built-in filter is used for ordering items in AngularJS?

    • A) orderBy
    • B) filterBy
    • C) sort
    • D) order

    Answer: A) orderBy

  10. What is the purpose of ng-show directive in AngularJS?

    • A) It binds the application data to the HTML view.
    • B) It repeats a set of HTML elements for each item in a collection.
    • C) It displays or hides an HTML element based on an expression.
    • D) It defines a new controller in AngularJS.

    Answer: C) It displays or hides an HTML element based on an expression.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

82354