Explain AngularJS Data Binding?
Difference between angular expression and JavaScript
expressions.
Explain AngularJS Expression.
What is Directives? Explain Custom Directives.?
Explain Properties of directive.
Explain Functions of AngularJS Directive Life Cycle?
Explain ng-click , ng-controller, ng-if
,ng-disable,ng-repeat,ng-model,ng-controller with example.
MCQ
1.Which of the following is true about ng-app
directive?
A.
ng-app directive defines and links an
angularjs application to html
B.
ng-app directive indicates the start of
the application.
C.
Both of the above
D.
None of the above
2.AngularJS
application expressions are pure Javascript expressions.
A.
True
B.
False
3. Which of the following is true about ng-hide
directive?
A.
ng-hide directive can show a given
control
B.
ng-hide directive can hide a given
control
C.
Both of the above
D.
None of the above
4.AngularJS expression are written using……….
A.
{{expression}}
B.
[expression]
5.Which Angular directive is used to binds the value
of HTML controls (input,select,textarrea) to application data?
A.
ng-click
B.
ng-bind
C.
ng-model
D.
ng-view
6. Which Angular Directives is used to disable an
Element ?
A.
ng-click
B.
ng-disable
C.
ng-model
D.
ng-view
7.Angularjs directives are used in ……
A.
Model
B.
Controller
C.
Service
D.
View
8. Which of the following directive allows us to use
a form in AngularJS?
A.
ng-include
B.
ng-directive
C.
ng-form
D.
ng-bind
9.Which of the following are validation directives?
A.
ng-required
B.
ng-minlength
C.
ng-pattern
D.
All of the above
10.The ……. directive is
used if you want to add or remove HTML elements from the DOM based on data in
the model
A. ng-switch
B. ng-model
C. ng-disabled
D. ng-click
12.Which of the
following directive is used to initialize an angular app?
A. ng-switch
B. ng-model
C. ng-app
D. ng-click
13. Directives are special attributes starting with ……..
A. ng-prefix
B. ng-postfix
14. What are Angular Controllers are
responsible for
A. Controlling the
data
B. Displaying
the data
15.Is
AngularJS supports two way binding ?
A. True
B. False
16.Is
AngularJs supports internationalization?
A. True
B. False
17.Can we extend
AngularJS?
A.
True
B.
False
18. AngularJS directives can be written
in Templates as
A. Tag
B. Attribute
C. Class
name
D. All
of the above
19.Which of the
following directive allows us to use a form in AngularJs?
A. ng-include
B. ng-form
C. ng-directive
D. ng-bind
20.Which of the
following can be used as a prefix for Directive?
A.
ng-
B.
x-
C.
data-
D.
All of the above
21.What is data binding
in angular JS?
A.
Synchronization between model part and
view part
B.
Synchronization between controller part
and view part
C.
Synchronization between model part and
controller part
D.
None of the above
22.
Which
sign is used as prefix for the built-in objects in AngularJS?
A. #
B. %
C. @
D. $
23. Which
directive is used to specify a controller in HTML element?
A.
ng-control
B.
ng-controller
C.
ng-ctrl
D.
Controller
24. ng-model
binds the values of AngularJS application data to HTML input controls.
A
- true
B
– false
25.ng-init directive
can be used to put values to the variables to be used in the application.
A
- true
B
– false
26.In
controllers, model data is accessed via $scope object.
A
- false
B
– true
27.Which
of the following directive bootstraps AngularJS framework?
A
ng-init
B
ng-app
C
ng-controller
D
ng-bootstrap
28.
Which
of the following is a valid AngularJS expression?
A.{{
2 + 2 }}
B.{
2 + 2 }
C.((
2 + 2 ))
D.{
(2 + 2) }
29.
Which
of the following statements are true?
A.Expression
cannot contain condition, loop or RegEx
B.Expression
cannot declare a function
C.Expression
cannot contain comma, void or return keyword
D.All
of the above
30.
AngularJS
directives can be written in HTML element as:
A.Tag
B.Attribute
C.Class
name
D.All
of the above
31.The
ng-model directive is used for __________.
A.One-way
data binding
B.Two-way
data binding
C.Binding
view to controller
D.None
of the above