1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// service downloadFile(id: number): Observable<Blob>{ return this.http.get(`downloadurl` + id,{ responseType: 'blob' }); } //import in top of ts file import { saveAs } from 'file-saver'; // compoment ... |
Category AngularJs
1 2 3 |
setTimeout(()=>{ // your code }, 10000); |
HTML
1 2 3 4 5 6 7 8 9 |
<div class="panel-body" ng-controller="TreeCtrl"> <div ng-show="showLoader" style="text-align:center;"> <img src="assets/images/LoaderIcon.gif"> <!-- or any other spinner --> |