diff options
| author | Igor Minar | 2012-06-10 09:01:42 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-06-10 09:01:42 -0700 | 
| commit | 5d70e4a89cd9b3d430bb81f438cf03e956d9a9d2 (patch) | |
| tree | 2a9311d9735c938321e581b22fb3e06c40839385 /docs/content/guide/dev_guide.unit-testing.ngdoc | |
| parent | b5bba65a9353ca9dc03b8d0c3c9b06d9c4cdacdf (diff) | |
| download | angular.js-5d70e4a89cd9b3d430bb81f438cf03e956d9a9d2.tar.bz2 | |
docs(*): fix various outdated docs and examples
Closes #1030
Diffstat (limited to 'docs/content/guide/dev_guide.unit-testing.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.unit-testing.ngdoc | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/docs/content/guide/dev_guide.unit-testing.ngdoc b/docs/content/guide/dev_guide.unit-testing.ngdoc index f9e148eb..2083f2e4 100644 --- a/docs/content/guide/dev_guide.unit-testing.ngdoc +++ b/docs/content/guide/dev_guide.unit-testing.ngdoc @@ -218,16 +218,16 @@ In angular the controllers are strictly separated from the DOM manipulation logi  a much easier testability story as can be seen in this example:  <pre> -function PasswordCntrl() { -  this.password = ''; -  this.grade = function() { -    var size = this.password.length; +function PasswordCntrl($scope) { +  $scope.password = ''; +  $scope.grade = function() { +    var size = $scope.password.length;      if (size > 8) { -      this.strength = 'strong'; +      $scope.strength = 'strong';      } else if (size > 3) { -      this.strength = 'medium'; +      $scope.strength = 'medium';      } else { -      this.strength = 'weak'; +      $scope.strength = 'weak';      }    };  } | 
