aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/guide/dev_guide.services.injecting_controllers.ngdoc')
-rw-r--r--docs/content/guide/dev_guide.services.injecting_controllers.ngdoc11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc b/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc
index 64fa0aaf..3dce7672 100644
--- a/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc
+++ b/docs/content/guide/dev_guide.services.injecting_controllers.ngdoc
@@ -53,18 +53,19 @@ function myController(scope, notifyService) {
myController.$inject = ['$scope','notify'];
</script>
-<div ng-controller="myController">
+<div id="simple" ng-controller="myController">
<p>Let's try this simple notify service, injected into the controller...</p>
<input ng-init="message='test'" ng-model="message" >
<button ng-click="callNotify(message);">NOTIFY</button>
<p>(you have to click 3 times to see an alert)</p>
</div>
</doc:source>
-<doc:scenario>
+<doc:protractor>
it('should test service', function() {
- expect(element(':input[ng\\:model="message"]').val()).toEqual('test');
+ expect(element(by.id('simple')).element(by.model('message')).getAttribute('value'))
+ .toEqual('test');
});
-</doc:scenario>
+</doc:protractor>
</doc:example>
## Implicit Dependency Injection
@@ -95,7 +96,7 @@ function myController($scope, notify) {
};
}
</script>
-<div ng-controller="myController">
+<div id="implicit" ng-controller="myController">
<p>Let's try the notify service, that is implicitly injected into the controller...</p>
<input ng-init="message='test'" ng-model="message">
<button ng-click="callNotify(message);">NOTIFY</button>