mercredi 15 mars 2017

assets folder not reachable in cordova / ember.js project

i am developing an app for my windows phone 10, using ember.js and cordova. Why am I unable to display images - always getting the following error:

The app couldn’t resolve ms-appx://io.cordova.myappXXXX/assets/images/myImage.png because of this error: DATA_NOT_AVAILABLE.

My workflow:

  1. creating ember.js app
  2. folder for images:

    myEmberProject/public/assets/images/myImage.png

  3. Image-HTML tag within a template:

    < img src="assets/images/myImage.png" alt="Image not available"/>

    // = ''

  4. Running this app in a browser (firefox, chrome etc.) works great for me, so next step...

  5. run 'ember build'
  6. copy all folders/files from

    dist/

    to

    myCordovaProjekt/www/

  7. Debug / Run Cordova directly to my windows phone

  8. App is opening, js and css files are ok, but i get no image, only the alternative text

    Image not available

What am I doing wrong?

Thank you for helping me!




Aucun commentaire:

Enregistrer un commentaire