aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/tutorial/step_10.ngdoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/tutorial/step_10.ngdoc')
-rw-r--r--docs/content/tutorial/step_10.ngdoc15
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/content/tutorial/step_10.ngdoc b/docs/content/tutorial/step_10.ngdoc
index 640977e6..b16ceaab 100644
--- a/docs/content/tutorial/step_10.ngdoc
+++ b/docs/content/tutorial/step_10.ngdoc
@@ -22,7 +22,8 @@ The most important changes are listed below. You can see the full diff on [GitHu
## Controller
__`app/js/controllers.js`:__
-<pre>
+
+```js
...
var phonecatControllers = angular.module('phonecatControllers',[]);
@@ -37,7 +38,7 @@ phonecatControllers.controller('PhoneDetailCtrl', ['$scope', '$routeParams', '$h
$scope.mainImageUrl = imageUrl;
}
}]);
-</pre>
+```
In the `PhoneDetailCtrl` controller, we created the `mainImageUrl` model property and set its
default value to the first phone image URL.
@@ -48,7 +49,8 @@ We also created a `setImage` event handler function that will change the value o
## Template
__`app/partials/phone-detail.html`:__
-<pre>
+
+```html
<img ng-src="{{mainImageUrl}}" class="phone">
...
@@ -59,7 +61,7 @@ __`app/partials/phone-detail.html`:__
</li>
</ul>
...
-</pre>
+```
We bound the `ngSrc` directive of the large image to the `mainImageUrl` property.
@@ -80,7 +82,8 @@ to the first phone image by default. The second test clicks on several thumbnail
verifies that the main image changed appropriately.
__`test/e2e/scenarios.js`:__
-<pre>
+
+```js
...
describe('Phone detail view', function() {
@@ -100,7 +103,7 @@ __`test/e2e/scenarios.js`:__
});
});
});
-</pre>
+```
You can now rerun `./scripts/e2e-test.sh` or refresh the browser tab with the end-to-end test
runner to see the tests run, or you can see them running on [Angular's server](http://angular.github.com/angular-phonecat/step-10/test/e2e/runner.html).