From 4d4da556eb2a401ad92323e04c803ff2e77924b0 Mon Sep 17 00:00:00 2001 From: Trevor Ewen Date: Wed, 19 Mar 2014 21:06:50 -0400 Subject: docs($document): add a documentation example. The $document docs are pretty empty, and this fills them out a bit. The example itself may not be particularly useful, but it could be improved or removed later. Works for me. Closes #6757 --- src/ng/document.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/ng/document.js') diff --git a/src/ng/document.js b/src/ng/document.js index cc760477..321a3652 100644 --- a/src/ng/document.js +++ b/src/ng/document.js @@ -7,6 +7,22 @@ * * @description * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object. + * + * @example + + +
+

$document title:

+

window.document title:

+
+
+ + function MainCtrl($scope, $document) { + $scope.title = $document[0].title; + $scope.windowTitle = angular.element(window.document)[0].title; + } + +
*/ function $DocumentProvider(){ this.$get = ['$window', function(window){ -- cgit v1.2.3