Sunday, November 7, 2021

Multiple Choice Questions - Angular 4 Bindings

 1. Data bindings are applied as . . . . . . . . or as special sequences of characters in strings.

A) expressions
B) attributes on HTML elements
C) elements itself
D) none of above

2. Binding types such as Interpolation, Property, Attribute, Class and Style support . . . . . . data flow from the data source (exposed from the component) to a view or template.

A) one-way
B) two-way
C) three-way
D) both-ways

3. Angular provides a special version of the standard property binding, known as the . . . . . . . . ., that is used to include expression results in the text content of host elements.

A) string extrapolation binding
B) evaluation binding
C) crypto binding
D) string interpolation binding

4. A data binding has these four parts:

A) host element, curly brackets, target, expression
B) host element, square brackets, target, evaluation
C) host element, square brackets, target, expression
D) host element, parentheses, target, expression

5. Property binding works on component properties too.

A) True
B) False

6. Two-way binding allows for data to be easily displayed and updated simultaneously. This makes it easy to reflect any changes the user makes to the DOM. Angular does this by using . . . . . . to watch for changes and then update the value.

A) ng-init
B) ngModel
C) ng-bind
D) ngControl

7. The . . . . . . . tell Angular that this is a one-way data-binding that has an expression that should be evaluated.

A) parentheses ()
B) curly brackets
C) angle brackets ⟨ ⟩
D) square brackets (the [ and ] characters)

8. Attribute binding is similar to property binding but is tied to the . . . . . . . . rather than the DOM property.

A) Page attribute
B) DOM attribute
C) Root attribute
D) HTML attribute

9. The most commonly encountered attribute without a corresponding property is . . . . . ., which is used to set the number of columns that a td element will occupy in a table.

A) href
B) src
C) colspan
D) rowspan

10.

A) This binding evaluates the expression and uses the result to replace any existing class memberships.
B) This binding evaluates the expression and uses the result to set the element’s membership of class.
C) This binding sets class membership of multiple classes using the data in a map object.

Answers
1) b, 2) a, 3) d, 4) c, 5) a, 6) b, 7) d, 8) d, 9) c, 10) a

No comments:

Post a Comment

Get max value for identity column without a table scan

  You can use   IDENT_CURRENT   to look up the last identity value to be inserted, e.g. IDENT_CURRENT( 'MyTable' ) However, be caut...