AngularJS | Fresco Play

AngularJS | Fresco Play

Monday, May 22, 2023
~ 4 min read
AngularJS 1 | Fresco Play

Question 1: Identify the dependency / dependencies for myController

Answer: Both $scope and dataService


Question 2: Which is not true about dependency injection in AngularJS?

Answer: Dependencies are added only at controller level


Question 3: is the passing of a dependency to the dependent object.

Answer: Injection


Question 4: What is injector?

Answer: It is a service locator, used to retrieve object instance


Question 5: When you inject a service into a controller, _______ looksup and instantiates the service for the controller.

Answer: Injector


Question 6: Scope act as glue between controller and view.

Answer: True


Question 7: Using factory method, we first define a factory and then assign a method to it. Is it true or false?

Answer: True


Question 8: What are services in AngularJS?

Answer: Services are singleton objects which are instantiated only once in app and are used to do the defined task


Question 9: Return statement is mandatory in _____ whereas the same is not needed in

Answer: Factory, Service


Question 10: When declaring a factory name as an injectable argument, AngularJS provides

Answer: The value returned by invoking the function Passed to module.factory


Question 11: What is factory method in angularJs?

Answer: It is used to create the directive. It is invoked only once, when compiler matches the directive for the first time


Question 12: In ____, 'this' keyword is used

Answer: Service


Question 13: You have a data that can be changed frequently in the application. Which one of the provider types would you choose to assign values?

Answer: Constant


Question 14: Which component can be injected as a dependency in AngularJS?

Answer: All of these


Question 15: Which of provider type can be injected during config phase

Answer: Constant and provider


Question 16: Which ones are singleton in AngularJS?

Answer: Service and factory


Question 17: $apply is at controller level and $digest looks for changes at module level.

Answer: False


Question 18: What is the second argument in $watch?

Answer: Listener


Question 19: Controller binds model data to views using

Answer: $scope


Question 20: Which of the following is default scope type of angular?

Answer: existing scope


Question 21: Changes at each scope level of every controller is monitored by

Answer: $watch


Question 22: Dependency injection into the angular module is done at which phase?

Answer: Bootstrap phase


Question 23: In controllers, model data is accessed via $scope object.

Answer: True


Question 24: Constant can store array of data, not just single value. True or False?

Answer: True


Question 25: Angular comes with a CSS library to provide default styling to the componenets

Answer: True


Question 26: What technique angularjs uses for two way binding?

Answer: Dirty checking


Question 27: Which of the following refers to view component in angular js ?

Answer: DOM


Question 28: Which method is used to send a notification to the parent scope?

Answer: $emit()


Question 29: Which one of these are not a filter of Angular js?

Answer: none of these


Question 30: Which of the below directive removes the element from DOM if expression evaluates to false?

Answer: ng-if


Question 31: What directive is used to bootstrap an angular application?

Answer: ng-app


Question 32: Which of the directive is used to display text?

Answer: ng-list


Question 33: $scope is created with ng-controller while $rootscope is created with ng-app. True of false?

Answer: True


Post a comment

Comments

Join the conversation and share your thoughts! Leave the first comment.

Get your FREE PDF on "100 Ways to Try ChatGPT Today"

Generating link, please wait for: 60 seconds

Checkout all hot deals now 🔥

Search blogs

No blog posts found