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
- {return
- this.http.get('https://localhost:44318/api/Albums/' + id).map((response: Response)=>
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);
- })}

Laxmidhar SahooPosted Jan 3, 2020, 8:59 AM
bishoe nbPosted Jan 3, 2020, 8:10 AM
bishoe nbPosted Jan 3, 2020, 8:09 AM
Laxmidhar SahooPosted Jan 2, 2020, 11:24 PM