Create New Post

AngularJS MCQs - 9

  1. What does ng-copy directive do in AngularJS?

    • A) It binds a copy event to a function.
    • B) It initializes the AngularJS application.
    • C) It defines a new controller in AngularJS.
    • D) It hides an element until AngularJS has finished its compilation.

    Answer: A) It binds a copy event to a function.

  2. Which AngularJS service is used for managing browser cookies manipulation?

    • A) $cookies
    • B) $cookieStore
    • C) $browser
    • D) $cookie

    Answer: A) $cookies

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

    • A) It hides an HTML element.
    • B) It initializes the AngularJS application.
    • C) It defines a new controller in AngularJS.
    • D) It binds CSS classes to HTML elements based on expression evaluation.

    Answer: A) It hides an HTML element.

  4. Which AngularJS service is used for broadcasting events to child scopes?

    • A) $broadcast
    • B) $emit
    • C) $on
    • D) $watch

    Answer: A) $broadcast

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

    • A) It binds the checked state of an input element to an expression.
    • B) It initializes the AngularJS application.
    • C) It defines a new controller in AngularJS.
    • D) It hides an element until AngularJS has finished its compilation.

    Answer: A) It binds the checked state of an input element to an expression.

  6. What does ng-swipe directive do in AngularJS?

    • A) It binds a swipe event to a function.
    • B) It initializes the AngularJS application.
    • C) It defines a new controller in AngularJS.
    • D) It hides an element until AngularJS has finished its compilation.

    Answer: A) It binds a swipe event to a function.

  7. Which AngularJS service is used for making WebSocket requests?

    • A) $websocket
    • B) $ws
    • C) $socket
    • D) $webSocket

    Answer: A) $websocket

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

    • A) It disables data binding for an element.
    • B) It disables input fields in a form.
    • C) It disables event handling for an element.
    • D) It disables an HTML element based on an expression.

    Answer: D) It disables an HTML element based on an expression.

  9. Which AngularJS service is used for managing browser history and location information?

    • A) $location
    • B) $history
    • C) $navigate
    • D) $browser

    Answer: A) $location

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

    • A) It enables touch events in AngularJS applications.
    • B) It initializes the AngularJS application.
    • C) It defines a new controller in AngularJS.
    • D) It hides an element until AngularJS has finished its compilation.

    Answer: A) It enables touch events in AngularJS applications.

Comments

Leave a Reply

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

79273