Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65668854
image.service.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jun 5, 10:24
Size
548 B
Mime Type
text/x-java
Expires
Fri, Jun 7, 10:24 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18109644
Attached To
rSVGTESTAPP svg-test-app
image.service.ts
View Options
import {EventEmitter, Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable } from 'rxjs';
import {map} from 'rxjs/operators';
import {Image} from '../models/models';
@Injectable({
providedIn: 'root'
})
export class ImageService {
constructor(private http: HttpClient) {
}
onClickedImage = new EventEmitter<Image>();
public getImage(imageUrl: string): Observable<File> {
return this.http
.get(imageUrl, { responseType: 'blob' })
.pipe(map((res: any) => res.blob())); }
}
Event Timeline
Log In to Comment