New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ionic 2 - not working inside "ion-card" directive #196
Comments
Hi, Are the |
Thanks for the quick reply. Here is what my view basically has: ** all that wrapped in a "ion-content" but for some reason is not being properly formatted here.
|
I think Can you try to use the following template: <ion-content #container>
<ion-card>
<img defaultImage]="defaultImage" [lazyLoad]="place.imgUrl" [scrollTarget]="container.scrollElement" />
you content
</ion-card>
</ion-content> |
Thanks for looking into this, I have tried with the provided code but made no difference, I think ion-content is not the problem and ion-card might be, because if you take the img tag outside the ion-card it works just fine. Did you try to reproduce it from your side? I could share a project in bitbucket in case you didn't. Thanks |
Humm, okay. Yeah, that would be super nice if I could get access to your project :) I'm using |
Did you solve the problem? I will close this issue now but feel free to reopen it. |
I am having a similar problem that may be related to endless scrolling. My project in development is http://veterinary.communityone.com , you would have to create a login to see the content then click on social feed from the sidebar once logged in. The initial page shows the image fine but once endless scrolling begins the first image reverts to a spinner and never appears again. |
@jcbowyer, I just created an account but I could not reproduce the problem. I only three posts and did not get any infinite scroll. |
Thanks I eventually changed something and it started working. I’m not sure exactly what fixed it |
@tjoskar Same issue here. Any potential fix for this? |
@jeffreyramia, same issue? Are you also using ionic and |
Hi there,
I'm facing this issue with Ionic 2:
Basically, what is happening is that when the img tag is inside the ion-card directive the image is not loading at all, it only shows the "defaultImage". Positioning the image outside the ion-card it works OK.
Please let me know if you can take a look at this.
in place.ts
...
export class PlacePage {
defaultImage: string = 'http://via.placeholder.com/350x150';
place: any = {
imgUrl: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSSCP8YYuzKCXQLhQ7mkH5I_VpZ0v23BWrJ4QkxSSldl7sOV__xKA'
};
constructor() {
}
...
}
in place.html:
<ion-card> <img [defaultImage]="defaultImage" [lazyLoad]="place.imgUrl" /> ..... </ion-card>
Thanks
The text was updated successfully, but these errors were encountered: