how can show images from db using ngx-gallery angular7 i try by this code but not work
Error GET https://localhost:44318/Resources/Images/this._PhotoT.imageNameTh 404
in console log show The Full object fine
- getdetails(id:number): Observable <Photo[]>
- {return
- this.http.get('https://localhost:44318/api/Albums/' + id).map((response: Response)=>
- <Photo[]>response.json());} cOmponent_PhotoT : Photo[];images: GalleryItem[];ngOnInit(): void {this.Get();this.images = [new ImageItem({ src: 'https://localhost:44318/Resources/Images/'+ 'this._PhotoT.imageNameTh' }),// ... more items];//
- this.images = [
- new ImageItem({ src: 'https://localhost:44318/Resources/Images/'+ //this._PhotoT.imageNameTh}),// ... more items// ];}
-
- Get(){let id : number = this._activeRoute.snapshot.params['PhotoId'];this._PhotosAlbumService.getdetails(id).retryWhen((err) =>
- {return err.scan((retryCount) =>{retryCount +=1;}, 0).delay(1000)
- })
- .subscribe((PhotoAlbum) => {
- if(PhotoAlbum == null){
- this.statusMessage = ' does not exist';
- } else {
- this._PhotoT= PhotoAlbum
- console.log (this._PhotoT);}},
- (error) =>{
- this.statusMessage = "please try again after sometime"
- console.log(error);
- })}
<gallery [items]="images"></gallery>