aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/tutorial/step_04.ngdoc
diff options
context:
space:
mode:
authorCaitlin Potter2014-02-06 14:02:18 +0000
committerPeter Bacon Darwin2014-02-16 19:03:40 +0000
commitf7d28cd377f06224247b950680517a187a7b6749 (patch)
tree20203b9f7bf60748bb752f325b1869415352a6f3 /docs/content/tutorial/step_04.ngdoc
parent2e641ac49f121a6e2cc70bd3879930b44a8a7710 (diff)
downloadangular.js-f7d28cd377f06224247b950680517a187a7b6749.tar.bz2
docs(all): convert <pre>/</pre> snippets to GFM snippets
Diffstat (limited to 'docs/content/tutorial/step_04.ngdoc')
-rw-r--r--docs/content/tutorial/step_04.ngdoc20
1 files changed, 12 insertions, 8 deletions
diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc
index 612619a4..adf362b6 100644
--- a/docs/content/tutorial/step_04.ngdoc
+++ b/docs/content/tutorial/step_04.ngdoc
@@ -24,7 +24,8 @@ The most important differences between Steps 3 and 4 are listed below. You can s
## Template
__`app/index.html`:__
-<pre>
+
+```html
Search: <input ng-model="query">
Sort by:
<select ng-model="orderProp">
@@ -39,7 +40,7 @@ __`app/index.html`:__
<p>{{phone.snippet}}</p>
</li>
</ul>
-</pre>
+```
We made the following changes to the `index.html` template:
@@ -65,7 +66,8 @@ necessary!
## Controller
__`app/js/controllers.js`:__
-<pre>
+
+```js
var phonecatApp = angular.module('phonecatApp', []);
phonecatApp.controller('PhoneListCtrl', function ($scope) {
@@ -83,7 +85,7 @@ phonecatApp.controller('PhoneListCtrl', function ($scope) {
$scope.orderProp = 'age';
});
-</pre>
+```
* We modified the `phones` model - the array of phones - and added an `age` property to each phone
record. This property is used to order phones by age.
@@ -107,7 +109,8 @@ The changes we made should be verified with both a unit test and an end-to-end t
the unit test first.
__`test/unit/controllersSpec.js`:__
-<pre>
+
+```js
describe('PhoneCat controllers', function() {
describe('PhoneListCtrl', function(){
@@ -130,7 +133,7 @@ describe('PhoneCat controllers', function() {
});
});
});
-</pre>
+```
The unit test now verifies that the default ordering property is set.
@@ -146,7 +149,8 @@ You should now see the following output in the Karma tab:
Let's turn our attention to the end-to-end test.
__`test/e2e/scenarios.js`:__
-<pre>
+
+```js
...
it('should be possible to control phone order via the drop down select box',
function() {
@@ -164,7 +168,7 @@ __`test/e2e/scenarios.js`:__
"Motorola XOOM\u2122 with Wi-Fi"]);
});
...
-</pre>
+```
The end-to-end test verifies that the ordering mechanism of the select box is working correctly.