Skip to content
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

the image shown is the last one #28

Open
peppeg85 opened this issue Apr 3, 2020 · 0 comments
Open

the image shown is the last one #28

peppeg85 opened this issue Apr 3, 2020 · 0 comments

Comments

@peppeg85
Copy link

peppeg85 commented Apr 3, 2020

Hello, thnks for the plugin, i have this problem: i set the image from url, the first time i open the page it's everything ok, but when i reload the page it opens the previous image, i set also the src to empty string and then set it, but with no success. what can i try?
here is my code:

<Page loaded="loaded" xmlns:shared="shared" xmlns:nsDrawer="nativescript-ui-sidedrawer" xmlns:ui="nativescript-image-zoom"
>
    <shared:actionbar></shared:actionbar>
    <nsDrawer:RadSideDrawer id="sideDrawer" showOverNavigation="true">
        <nsDrawer:RadSideDrawer.drawerContent>
            <shared:side-drawer></shared:side-drawer>
        </nsDrawer:RadSideDrawer.drawerContent>
        <nsDrawer:RadSideDrawer.mainContent>

            <GridLayout columns="*" rows="*">
                <ui:ImageZoom col="0" row="0" src="{{ event.pictureUrl }}" maxZoom="5" minZoom="1"/>
            </GridLayout>

        </nsDrawer:RadSideDrawer.mainContent>
    </nsDrawer:RadSideDrawer>
</Page>
var Observable = require("tns-core-modules/data/observable").Observable;
var moment = require('moment')
var LoadingIndicator = require("@nstudio/nativescript-loading-indicator").LoadingIndicator;
var loader = new LoadingIndicator();

moment.locale('it');

var pageData = new Observable();
var page;

exports.loaded = function (args) {
    loader.show();
    page = args.object;
    page.bindingContext = pageData;
    var gotData = page.page.navigationContext;

    pageData.set("event", []);
    pageData.set("event", gotData.event);
    loader.hide()
};
@peppeg85 peppeg85 changed the title the image displayed is the last one the image showed is the last one Apr 3, 2020
@peppeg85 peppeg85 changed the title the image showed is the last one the image shown is the last one Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant