File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 16
16
* @example
17
17
<doc:example>
18
18
<doc:source>
19
- <input ng-init="$window = $service('$window'); greeting='Hello World!'" type="text" ng-model="greeting" />
20
- <button ng-click="$window.alert(greeting)">ALERT</button>
19
+ <script>
20
+ function Ctrl($scope, $window) {
21
+ $scope.$window = $window;
22
+ $scope.greeting = 'Hello, World!';
23
+ }
24
+ </script>
25
+ <div ng-controller="Ctrl">
26
+ <input type="text" ng-model="greeting" />
27
+ <button ng-click="$window.alert(greeting)">ALERT</button>
28
+ </div>
21
29
</doc:source>
22
30
<doc:scenario>
31
+ it('should display the greeting in the input box', function() {
32
+ input('greeting').enter('Hello, E2E Tests');
33
+ // If we click the button it will block the test runner
34
+ // element(':button').click();
35
+ });
23
36
</doc:scenario>
24
37
</doc:example>
25
38
*/
You can’t perform that action at this time.
0 commit comments