AngularJS Quiz | Set-1

  • Last Updated : 27 Sep, 2023

Question 1

Angular.js is the combination of which of the following languages ?

Cross

HTML and PHP

Cross

HTML and CrossScript

Cross

HTML and Bootstrap

Tick

HTML and TypeScript



Question 1-Explanation: 

TypeScript is preferable for creating the app so angular is a combination of Html and JavaScript language.

Question 2
Which of the below architecture patterns does angular is based on ?
Tick
MVC
Cross
VMC
Cross
MCV
Cross
CVM


Question 2-Explanation: 
The MVC, Model view controller is a pattern on which angular is based. MVC is a software design pattern that is used for developing the UI. So the architecture pattern that angular is based on MVC.
Question 3
Which of the following is a way for applying expression in AngularJS application ?
Cross
(expression)
Tick
{{expression}}
Cross
{({expression})}
Cross
[expression]


Question 3-Explanation: 
Inside two curly braces and then write the expression is the best way for applying the expression in Angular.js application. Angular expression is similar to the JavaScript expression we can easily use operator and variable inside the braces.
Question 4

 Which of the following is the way to manually start the application in Angular?

Tick

angular. bootstrap

Cross

angular.element

Cross

angular. copy

Cross

None of the above



Question 4-Explanation: 

angular. bootstrap is the functional component in core ng modules. It is the process of manually starting the application,  angular. bootstrap provides more control over the initialization process.

Question 5

What of the following is the correct way for applying multiple filters in AngularJS ?

Tick

{{ expression | filter1 | filter2}}

Cross

{{ expression | {filter1} | {filter2} }}

Cross

{{ expression - {filter1} - {filter2}}}

Cross

{{ {filter1} | {filter2} | ...expression}}



Question 5-Explanation: 

The correct syntax for applying the multiple filters is{{ expression | filter1 | filter2}}.

Question 6
Which of the following is used to bind the value of HTML controls in the text area to the application data ?
Cross
ng-cloak
Cross
ng-bind
Tick
ng-model
Cross
ng-blur


Question 6-Explanation: 
The ng-model binds the value of HTML controls It also binds the input area, select the text area and the store the user input value.
Question 7
Which of the following is the correct syntax for the create module in angularJs ?
Cross
ar myModule= module();
Cross
var myModule= new Module();
Tick
angular.module("app", []);
Cross
var Module= new Module(my);


Question 7-Explanation: 
The module is used for defining the angular application. For creating modules in angular the syntax is used as angular.module("app", []); Here angular.module means it creates the application module and it takes two parameters one is "app", the app is the name of modules and another one is the array([]) of dependent modules.
Question 8

Which of the below templates is used for writing the AngularJs directive ?

Cross

Tag

Cross

Attribute

Cross

Class name

Tick

All of the above



Question 8-Explanation: 

A Template is used for rendering the AngularJs component so the example of templates for writing the AngularJs directive is Tag, Attribute,className, etc.

Question 9

The component which is used for adding the dependency in AngularJS application are:

Cross

Value

Cross

Factory

Cross

Constant

Tick

Application Module



Question 9-Explanation: 

The application module is used for adding the dependency in the angular application and making the component more configurable. It is used for the block of code and is connected to the application domain.

Question 10
Which of the following is a way to push one HTML content into another HTML content?
Cross
Server Side push
Cross
Use of Comment
Cross
Use of pushing
Tick
Use of include


Question 10-Explanation: 
The use of include is a way to push the content from one HTML into other. So if you include the content you can use the ng-include directive. By default, include doesn't allow the pushing file from one to another component.
12
There are 15 questions to complete.