How can angular js display pdf? on the interface?

Nov.06,2021

this is a problem with browser controls.



controller
$http.get(url,{responseType: 'arraybuffer'})
                        .then(function (msg) {
                            var file = new Blob([msg.data], {type: 'application/pdf'});
                            var fileURL = URL.createObjectURL(file);
                            $scope.content=$sce.trustAsResourceUrl(fileURL);
                        });
 html
 <div class="modal-content" onloadstart="">
        <object ng-show="content" data="{{content}}" type="application/pdf" style="width: 100%;         height: 1000px;"></object>
    </div>                       
                        
                        
                        
Menu