Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1014e52 commit 3abfb4eCopy full SHA for 3abfb4e
src/ng/window.js
@@ -20,13 +20,15 @@
20
<doc:source>
21
<script>
22
function Ctrl($scope, $window) {
23
- $scope.$window = $window;
24
$scope.greeting = 'Hello, World!';
+ $scope.doGreeting = function(greeting) {
25
+ $window.alert(greeting);
26
+ };
27
}
28
</script>
29
<div ng-controller="Ctrl">
30
<input type="text" ng-model="greeting" />
- <button ng-click="$window.alert(greeting)">ALERT</button>
31
+ <button ng-click="doGreeting(greeting)">ALERT</button>
32
</div>
33
</doc:source>
34
<doc:scenario>
0 commit comments