function Root($scope) { // you can't write out the element itself as JSON, // because of circular object references, // so I'll just write out the inner html. $scope.elem = angular.element('div').html(); }
<html ng-app> <head></head> <body ng-controller="Root"> <h1>Selector Test</h1> <p> elem is: {{elem}}</p> <div>foo</div> </body> </html>