diff options
| author | Misko Hevery | 2011-11-29 12:11:32 -0800 |
|---|---|---|
| committer | Misko Hevery | 2012-01-25 11:46:36 -0800 |
| commit | 8af4fde18246ac1587b471a549e70d5d858bf0ee (patch) | |
| tree | 925e223c9221c8e3b40ff3fb5cade11b819782d5 /src/angular-mocks.js | |
| parent | 5001c1a1217772d2bffe108bafd475b24badf559 (diff) | |
| download | angular.js-8af4fde18246ac1587b471a549e70d5d858bf0ee.tar.bz2 | |
add($compile): add compiler v2.0 - not connected
Diffstat (limited to 'src/angular-mocks.js')
| -rw-r--r-- | src/angular-mocks.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/angular-mocks.js b/src/angular-mocks.js index 0645322b..c024343e 100644 --- a/src/angular-mocks.js +++ b/src/angular-mocks.js @@ -684,19 +684,17 @@ angular.mock.dump = function(object) { * * <pre> // controller - function MyController($http) { - var scope = this; - + function MyController($scope, $http) { $http.get('/auth.py').success(function(data) { - scope.user = data; + $scope.user = data; }); this.saveMessage = function(message) { - scope.status = 'Saving...'; + $scope.status = 'Saving...'; $http.post('/add-msg.py', message).success(function(response) { - scope.status = ''; + $scope.status = ''; }).error(function() { - scope.status = 'ERROR!'; + $scope.status = 'ERROR!'; }); }; } |
