Professional Documents
Culture Documents
Ngularjs Jumpstart: View, Directives and Filters
Ngularjs Jumpstart: View, Directives and Filters
View, Directives
and Filters
Module
Config
Routes
Directives *Factory
Data Binding Overview
Data Binding
Changes updated
in property
Changes updated
in control
Control-Oriented
versus
Data-Oriented
Control-Oriented Development Workflow
document.getElementById('name').value = 'John Doe';
var name = document.getElementById('name').value;
Data-Oriented Development Workflow
<input type="text" bindProperty="name" />
Controllers/ Events
Modules
Examples of AngularJS Directives
<div ng‐hide="isHidden">
<div data‐ng‐hide="isHidden">
<ng‐view></ng‐view>
AngularJS Expressions
Binding
markup {{ 1 + 1 }}
Expression
Iterating Over Data
Iterating with the ng-repeat Directive
<html ng‐app>
... Provides initial data
<div ng‐init="names=['Dave','Jeff','Heedy','Danny']">
<h3>Iterating through data with ng‐repeat</h3>
<ul>
<li ng‐repeat="name in names">{{ name }}</li>
</ul>
</div>
$9.99
9.9912
Currency Filter
Key AngularJS Filters
currency
date
filter
json
limitTo
lowercase
number
orderBy
uppercase
Sorting and Formatting Data
<ul>
<li data‐ng‐repeat="cust in customers | orderBy:'name'">
{{ cust.orderTotal | currency }}
</li>
</ul>
Format as currency Order customers by
name property
Filtering Data
Module
Config
Routes
Directives *Factory
Summary