I have a scope like $scope.doc_details in my angularjs controller, and I want to use it to display a pdf file by using a tag, like this:
$scope.doc_details
You first need to check if the response is an arraybuffer, if it is, convert it to base 64. Also you can use setattribute to assign.