From 0a604bdb90e9dff9399bae0fb4941fe46cc7e9f9 Mon Sep 17 00:00:00 2001 From: Kenneth R. Culp Date: Tue, 26 Apr 2011 09:54:08 -0700 Subject: Tutorial files for your perusal. --- docs/tutorial.step_6.ngdoc | 101 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100755 docs/tutorial.step_6.ngdoc (limited to 'docs/tutorial.step_6.ngdoc') diff --git a/docs/tutorial.step_6.ngdoc b/docs/tutorial.step_6.ngdoc new file mode 100755 index 00000000..dc7b07ed --- /dev/null +++ b/docs/tutorial.step_6.ngdoc @@ -0,0 +1,101 @@ +@workInProgress +@ngdoc overview +@name Tutorial: Step 6 +@description +
| {@link tutorial.step_5 Previous} | +{@link http://angular.github.com/angular-phonecat/step-6/app Example} | +{@link tutorial Tutorial Home} | +{@link +https://github.com/angular/angular-phonecat/commit/2fb113a4da9b6d19e17627f351f0681befcccdc0 Code +Diff} | +{@link tutorial.step_7 Next} | +
+... +
{{phone.snippet}}
+
+/* App Controllers */
+
+function PhoneListCtrl($xhr) {
+ var self = this;
+
+ $xhr('GET', 'phones/phones.json', function(code, response) {
+ self.phones = response;
+ });
+
+ self.orderProp = 'age';
+}
+
+//PhoneListCtrl.$inject = ['$xhr'];
+
+
+__`app/phones/phones.json`__ (sample snippet):
+
+ [
+ {
+ "age": 4,
+ ...
+ "carrier": "T-Mobile",
+ "id": "motorola-defy-with-motoblur",
+ "imageUrl": "http://google.com/phone/image/small/640001",
+ "name": "Motorola DEFY\u2122 with MOTOBLUR\u2122",
+ "snippet": "Are you ready for everything life throws your way?"
+ },
+ …
+ ]
+
+
+## Discussion:
+
+* Note that we're using {@link guide.expression angular expressions} enclosed in the now-familiar
+{@link angular.markup double-curly brace markup} in the href attribute values. These represent
+attribute bindings, and work the same way as the bindings we saw in previous steps.
+
+* Note also the use of the {@link angular.directive.ng:src ng:src} directive in the `| {@link tutorial.step_5 Previous} | +{@link http://angular.github.com/angular-phonecat/step-6/app Example} | +{@link tutorial Tutorial Home} | +{@link +https://github.com/angular/angular-phonecat/commit/2fb113a4da9b6d19e17627f351f0681befcccdc0 Code +Diff} | +{@link tutorial.step_7 Next} | +