From b842642b574a2b95c53b791308ed1bf8ff9d304d Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 15 Jun 2011 22:31:40 -0700 Subject: docs - stripping extra new lines --- docs/content/tutorial/step_09.ngdoc | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'docs/content/tutorial/step_09.ngdoc') diff --git a/docs/content/tutorial/step_09.ngdoc b/docs/content/tutorial/step_09.ngdoc index fc9ba360..0d5da766 100644 --- a/docs/content/tutorial/step_09.ngdoc +++ b/docs/content/tutorial/step_09.ngdoc @@ -2,44 +2,31 @@ @name Tutorial: 9 - Filters @description -
angular.filter('checkmark', function(input) {
@@ -47,21 +34,16 @@ angular.filter('checkmark', function(input) {
});
-
The name of our filter is "checkmark". The `input` evaluates to either `true` or `false`, and we
return one of two unicode characters we have chosen to represent true or false (`\u2713` and
`\u2718`).
-
-
## Template
-
Since the filter code lives in the `app/js/filters.js` file, we need to include this file in our
layout template.
-
__`app/index.html`:__
... @@ -70,19 +52,14 @@ __`app/index.html`:__ ...- The syntax for using filters in angular templates is as follows: - {{ expression | filter }} - Let's employ the filter in the phone details template: - - __`app/partials/phone-detail.html`:__
... @@ -96,19 +73,14 @@ __`app/partials/phone-detail.html`:__- - ## Test - Filters, like any other component, should be tested and these tests are very easy to write. - __`test/unit/filtersSpec.js`:__
describe('checkmark filter', function() {
-
it('should convert boolean values to unicode checkmark or cross', function() {
expect(angular.filter.checkmark(true)).toBe('\u2713');
expect(angular.filter.checkmark(false)).toBe('\u2718');
--
cgit v1.2.3