Is there a specific way to manage resource for Ionic app?


#1

I guess its related to managing local resources…

running with

ionic emulate ios -livereload -c

every resource are loaded good.

but when I run without it.

ionic emulate ios -c

it shows below errors

[Error] Failed to load resource: The requested URL was not found on this server. (X_Marker.png, line 0)
[Error] Failed to load resource: The requested URL was not found on this server. (window.html, line 0)

I am putting the img in www/img and template html for ng-directive in www/templates.

Here is my directory structure of ‘www’.

And calling it as below.

   var imagePost = {
            url: 'img/Default_Marker.png',
            size: new google.maps.Size(100, 100),
            origin: new google.maps.Point(0, 0),
            anchor: new google.maps.Point(17, 34),
            scaledSize: new google.maps.Size(1, 1)
        };

or for html,

return {
    restrict: 'A',
    templateUrl: '/templates/window.html',
    link: link
};

If this is fixed, I am really right behind my alpha build for test… HELP!


Strange behavior with "ionic run android"
Add does not run on device without livereload
Livereload and local files
Ionic livereload: wrong IP address is used
InAppBrowser and livereload
#2

Not having livereload shouldn’t be preventing anything. It most likely is a path issue with the images and templates.

Try this instead.

templateUrl: 'templates/window.html',

#3

Same issue with me. I didn’t see this question ealier, so posted a nearly duplicate question . Strange behavior with “ionic run android”

Any leads?