- What is deep linking in AngularJS?
A - Deep linking allows you to encode the state of the application in the URL so that it can be bookmarked.
B - Deep linking is an SEO-based technique.
C - Deep linking refers to linking various views to a central page.
D - None of the above.
Answer: A
Explanation
Deep linking allows you to encode the state of the application in the URL so that it can be bookmarked. The application can then be restored from the URL to the same state.
Q 2 - Which of the following is not a core AngularJS directive.
A - ng-app
B - ng-model
C - ng-bind
D - ng-state
Answer : D
Explanation
ng-state is not an AngularJS directive.
Q 3 - AngularJS application expressions are pure JavaScript expressions.
A - true
B - false
Answer: A
Explanation
AngularJS application expressions are pure JavaScript expressions.
Q 4 - Which of the following is true about the currency filters?
A - Currency filter formats text in a currency format.
B - Currency filter is a function that takes text as input.
C - Both of the above.
D - None of the above.
Answer: B
Explanation
Currency filter formats text in a currency format. It is simply added to AngularJS expression to filter out the result.
Q 5 - Model available in $rootScope can be overridden by its all child scopes.
A - true
B - false
Answer: A
Explanation
Model available in $rootScope can be overridden by its all child scopes.
Q 6 - Which components can be injected as a dependency in AngularJS?
A - value
B - factory
C - service
D - All of the above.
Answer : D
Explanation
All of the above can be injected as a dependency.
Q 7 - constants are used to pass values at the config phase.
A - true
B - false
Answer: A
Explanation
constants are used to pass values at the config phase because the value cannot be used to be passed during the config phase.
Q 8 - AngularJS applications can run on all major browsers and smartphones including Android and iOS-based phones/tablets.
A - true
B - false
Answer: A
Explanation
AngularJS applications can run on all major browsers and smartphones including Android and iOS-based phones/tablets.
Q 9 - lowercase filter is applied to an expression using a pipe character.
A - false
B - true
Answer: B
Explanation
the lowercase filter is applied to an expression using pipe character.
Q 10 - AngularJS bootstraps itself during the config phase.
A - true
B - false
Answer: A
Explanation
AngularJS bootstraps itself during the config phase.
Q 11- What is a Model in MVC?
A - Model represents server-side data.
B - Model represents data stored in a database.
C - Model is the lowest level of the pattern responsible for maintaining data.
D - None of the above.
Answer: C
Explanation
Model is the lowest level of the pattern responsible for maintaining data.
Q 12- Use novalidate with a form declaration to disable any browser specific validation.
A - true
B - false
Answer: A
Explanation
Use novalidate with a form declaration to disable any browser-specific validation.
Q13 - Is AngularJS open source?
A - true
B - false
Answer: A
Explanation
AngularJS is open source, completely free, and used by thousands of developers around the world. It is licensed under the Apache License version 2.0.
Q14 - $rootScope is the parent of all of the scope variables.
A - true
B - false
Answer: A
Explanation
$rootScope is the parent of all of the scope variables.
Q15 - Services are singleton objects which are instantiated only once in-app.
A - false
B - true
Answer: B
Explanation
Services are singleton objects which are instantiated only once in-app.
Q16 - What is data binding in AngularJS?
A - Data binding is the technique to save HTML data in the database.
B - Data binding is the technique to bind database data to HTML control.
C - Data binding is the automatic synchronization of data between model and view components.
D - Data binding is the automatic synchronization of data between model and controller components.
Answer: C
Explanation
Data binding is the automatic synchronization of data between model and view components.
Q17 - How angular.module works?
A - angular.module is used to create AngularJS modules along with its dependent modules.
B - angular.module is primarily used to create application modules.
C - Both of the above.
D - None of the above.
Answer: C
Explanation
the angular.module is used to create AngularJS modules along with its dependent modules. It is primarily used to create an application module.
Q18 - Which of the following is true about filter filters?
A - filter filter is a function that takes text as input.
B - filter filter is used to filter the array to a subset of it based on provided criteria.
C - Both of the above.
D - None of the above.
Answer: B
Explanation
filter filter is used to filter the array to a subset of it based on provided criteria. It is simply added to AngularJS expression to filter out the result.
Q19 - With AngularJS, the developer writes less code and gets more functionality.
A - false
B - true
Answer: B
Explanation
With AngularJS, a developer writes less code and gets more functionality.
Q20 - On which of the following types of components can we create a custom directive?
A - Element directives
B - Attribute
C - CSS
D - All of the above.
Answer : D
Explanation
AngularJS provides support to create custom directives for the following types of elements.
Element directives - Directive activates when a matching element is encountered.
Attribute - Directive activates when a matching attribute is encountered.
CSS - Directive activates when a matching css style is encountered.
Comment - Directive activates when a matching comment is encountered.
Q21 - What MVC stands for?
A - Model View Control
B - Model View Controller
C - Main View Controller
D - Main View Control
Answer: B
Explanation
MVC stands for Model View Controller.
Q22 - Which of the following is true about AngularJS expressions?
A - Expressions are used to bind application data to HTML.
B - Expressions are written inside double braces like {{ expression}}.
C - Expressions behave in the same way as ng-bind directives.
D - All of the above.
Answer : D
Explanation
Expressions are used to bind application data to HTML. Expressions are written inside double braces like {{ expression}}. Expressions behave in the same way as ng-bind directives. AngularJS application expressions are pure JavaScript expressions and output the data where they are used.
Q23 - $http service is used to make an Ajax call to the server.
A - false
B - true
Answer: B
Explanation
AngularJS provides $http control which works as a service to make ajax calls to read data from the server.
Q24 - We need to incorporate corresponding js according to the locale of the country to support Internationalization in AngularJS based applications.
A - true
B - false
Answer: A
Explanation
AngularJS supports inbuilt internationalization for three types of filters currency, date, and numbers. We only need to incorporate corresponding js according to the locale of the country. By default, it handles the locale of the browser. For example, to use Danish locale, use the following script
<script src="https://code.angularjs.org/1.2.5/i18n/angular-locale_da-dk.js"></script>
Q25 - Inbuilt services are always prefixed with the $ symbol.
A - true
B - false
Answer: A
Explanation
Inbuilt services are always prefixed with the $ symbol.
Q26 - currency filter is applied to an expression using pipe character.
A - true
B - false
Answer: A
Explanation
currency filter is applied to an expression using pipe character.
0 Comments