-
What does ng-disabled directive do in AngularJS?
- A) It binds the disabled 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 disabled state of an input element to an expression.
-
Which AngularJS service is used for managing client-side routing in AngularJS applications?
- A) $route
- B) $router
- C) $routeProvider
- D) $locationProvider
Answer: A) $route
-
What is the purpose of ng-show directive in AngularJS?
- A) It binds an HTML element to an AngularJS expression.
- 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 disables an HTML element based on an expression.
Answer: C) It displays or hides an HTML element based on an expression.
-
Which AngularJS service is used for injecting dependencies into AngularJS components?
- A) $injector
- B) $provider
- C) $dependency
- D) $inject
Answer: A) $injector
-
What is the purpose of ng-src directive in AngularJS?
- A) It specifies the value of the src attribute in HTML elements.
- B) It initializes the AngularJS application.
- C) It defines a new controller in AngularJS.
- D) It specifies the source of an external template.
Answer: A) It specifies the value of the src attribute in HTML elements.
-
What does ng-keydown directive do in AngularJS?
- A) It binds a keydown 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 keydown event to a function.
-
Which AngularJS service is used for making AJAX requests and handling responses?
- A) $http
- B) $ajax
- C) $request
- D) $fetch
Answer: A) $http
-
What is the purpose of ng-options directive in AngularJS?
- A) It initializes options for a select element.
- B) It binds a select element to a model.
- C) It initializes the AngularJS application.
- D) It defines a new controller in AngularJS.
Answer: A) It initializes options for a select element.
-
Which AngularJS directive is used to dynamically load templates?
- A) ng-template
- B) ng-include
- C) ng-view
- D) ng-switch
Answer: B) ng-include
-
What is the purpose of ng-selected directive in AngularJS?
- A) It binds the selected state of an option 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 selected state of an option element to an expression.
Comments