Tags Flashcards
ng-app
- Add to the HTML tag that is controlled by angular.
- Specify a module name
ng-app=’myModule’
ng-model
Binds an input, select, textarea to a property on the scope using NgModelController.
- Bind view into the model
ng-include
Include external HTML fragment.
It may be element, attribute, CSS class
ng-include as element
ng-include as attribute
ng-include as CSS class
ng-include:src
Expression that results an URL
- So, html file literals must be in quotations (javascript expression): src=” ‘file.html’ “
ng-href
Like href, but allows using {{ }} expressions.
ng-view
Looks up the actual routes, and replaces content of main with a template.
If current route changes, then the view changes.
ng-required
Use in input fields. Makes the field required.
ng-show
Element is shown only if the expression is true.
ng-show=”expression”
ng-disabled
If the expression is truthy, then special attribute “disabled” will be set on the element
ng-submit
Enables binding angular expressions to onsubmit events..
ng-submit=”login()” : executes login in the current scope.
ng-repeat
Iterate through a collection.
ng-repeat=”item in collection”
ng-repeat: get the key
ng-repeat=”(key,item) in collection”