-
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
-
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
-
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.
-
Which AngularJS service is used for making HTTP requests?
- A) $http
- B) $ajax
- C) $request
- D) $fetch
Answer: A) $http
-
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.
-
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.
-
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
-
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.
-
Which built-in filter is used for ordering items in AngularJS?
- A) orderBy
- B) filterBy
- C) sort
- D) order
Answer: A) orderBy
-
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