TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
bishoe nb
NA
623
80.5k
how can show images array from db using ngx-gallery
Jan 1 2020 4:39 PM
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>
Reply
Answers (
4
)
How to fill marker by result of latitude and longitude from
Angular Ui datePicker is in invalid state