Tags Flashcards

1
Q

ng-app

A
  • Add to the HTML tag that is controlled by angular.
  • Specify a module name

ng-app=’myModule’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ng-model

A

Binds an input, select, textarea to a property on the scope using NgModelController.

  • Bind view into the model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ng-include

A

Include external HTML fragment.

It may be element, attribute, CSS class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ng-include as element

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

ng-include as attribute

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ng-include as CSS class

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ng-include:src

A

Expression that results an URL

  • So, html file literals must be in quotations (javascript expression): src=” ‘file.html’ “
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ng-href

A

Like href, but allows using {{ }} expressions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

ng-view

A

Looks up the actual routes, and replaces content of main with a template.

If current route changes, then the view changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

ng-required

A

Use in input fields. Makes the field required.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

ng-show

A

Element is shown only if the expression is true.

ng-show=”expression”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

ng-disabled

A

If the expression is truthy, then special attribute “disabled” will be set on the element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

ng-submit

A

Enables binding angular expressions to onsubmit events..

ng-submit=”login()” : executes login in the current scope.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

ng-repeat

A

Iterate through a collection.

ng-repeat=”item in collection”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ng-repeat: get the key

A

ng-repeat=”(key,item) in collection”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ng-click

A

specify custom behavior when an element is clicked.

17
Q

ng-if

A

Removes /recreates portion of DOM tree.

  • it removes, not hides
  • important in case of :first-child css selectors
  • destroys controller, when reinserted, controller is recrerated