Skip to content

Commit e8278eb

Browse files
committed
Doc improvements
1 parent 0988e5a commit e8278eb

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

docs/content/docs/values/document.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ mocking a browser dependency in non-browser environment tests:
1717
angular.module('demo', []).value('$document', {});
1818
```
1919

20-
The wrapper also make accessible `window.document` directly in template scope
21-
via `ng-inject` directive.
20+
When combined with `ng-inject` directive, the wrapper also makes `document`
21+
object directly accessible in the template scope.
2222

2323
#### Demo
2424

docs/content/docs/values/window.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ mocking a browser dependency in non-browser environment tests:
1717
angular.module('demo', []).value('$window', {});
1818
```
1919

20-
The wrapper also make accessible `window` directly in template scope via
21-
`ng-inject` directive.
20+
When combined with `ng-inject` directive, the wrapper also makes `window` object
21+
directly accessible in the template scope.
2222

2323
#### Demo
2424

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<section ng-app>
2-
<div ng-inject="$document">Host {{ $document.location.host }}</div>
2+
<div ng-inject="$document">
3+
`document.location.host` == <b>{{ $document.location.host }}</b>
4+
</div>
35
</section>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<section ng-app>
22
<div ng-inject="$window"></div>
3-
<button ng-click="$window.alert('click')">Alert</button>
3+
<button class="btn btn-dark" ng-click="$window.alert('click')">Alert</button>
44
</section>

0 commit comments

Comments
 (0)