- 
	
Which AngularJS directive is used to dynamically add or remove HTML elements based on an expression?
- A) ng-if
 - B) ng-show
 - C) ng-hide
 - D) ng-switch
 
Answer: A) ng-if
 - 
	
What does ng-keypress directive do in AngularJS?
- A) It binds a key press event to a function.
 - B) It initializes the AngularJS application.
 - C) It defines a new controller in AngularJS.
 - D) It binds a key press event to an input element.
 
Answer: A) It binds a key press event to a function.
 - 
	
Which AngularJS service is used for accessing browser's history and location information?
- A) $location
 - B) $browser
 - C) $history
 - D) $navigate
 
Answer: A) $location
 - 
	
What is the purpose of ng-mouseover directive in AngularJS?
- A) It binds a mouseover 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 mouseover event to a function.
 - 
	
Which AngularJS directive is used to initialize AngularJS applications?
- A) ng-app
 - B) ng-init
 - C) ng-controller
 - D) ng-model
 
Answer: A) ng-app
 - 
	
What does ng-blur directive do in AngularJS?
- A) It binds a blur 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 blur event to a function.
 - 
	
Which AngularJS service is used for injecting dependencies into controllers, services, and other AngularJS components?
- A) $injector
 - B) $provider
 - C) $dependency
 - D) $inject
 
Answer: A) $injector
 - 
	
What is the purpose of ng-submit directive in AngularJS?
- A) It binds a submit event to a function.
 - B) It initializes the AngularJS application.
 - C) It defines a new controller in AngularJS.
 - D) It submits a form automatically.
 
Answer: A) It binds a submit event to a function.
 - 
	
Which AngularJS directive is used for creating custom directives in AngularJS applications?
- A) ng-directive
 - B) ng-custom
 - C) ng-create
 - D) ng-directive-name
 
Answer: D) ng-directive-name
 - 
	
What is the purpose of ng-focus directive in AngularJS?
- A) It binds a focus 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 focus event to a function.
 

Comments