$document is a service and work as a wrapper to access title, cookie and body of document. To access its property either we need to use prop or index[] and access them. In our example, we will display the title of the document. See the code snippet: $scope.title = $document[0].title;

<!DOCTYPE html> <html xmlns=""> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src=""></script> </head> <body ng-app="app"> <div ng-controller="controllerName"> <p>$document title : <b ng-bind="title"></b></p> </div> </body> </html> <script> var app = angular.module("app", []); app.controller('controllerName', ['$scope', '$document', function ($scope, $document) { $scope.title = $document[0].title; }]); </script>