ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

feature: allow Chrome to load starter index.html directly

Open lwenke opened this issue 12 years ago • 2 comments

In Mac OSX, ionic-starter-tabs and ionic-starter-sidemenu runs fine in Safari and Firefox if you load index.html directly (not using a server). In Chrome the screen is just white. From the console:

Failed to load resource: net::ERR_FILE_NOT_FOUND file:///Users/user/Projects/sideMenu/www/cordova.js 2 Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: not all, (-webkit-min-device-pixel-ratio: 1.5), not all, (min-resolution: 144dpi), (min-resolution: 1.5dppx) index.html:1 XMLHttpRequest cannot load file:///Users/user/Projects/sideMenu/www/templates/menu.html. Cross origin requests are only supported for HTTP. index.html:1 Error: A network error occurred. at file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:15483:11 at sendReq (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:15287:9) at $http.serverRequest (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:15021:16) at wrappedCallback (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:18435:81) at wrappedCallback (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:18435:81) at file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:18521:26 at Scope.$eval (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:19447:28) at Scope.$digest (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:19273:31) at Scope.$apply (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:19553:24) at file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:8772:15 ionic.bundle.js:16905 XMLHttpRequest cannot load file:///Users/user/Projects/sideMenu/www/templates/playlists.html. Cross origin requests are only supported for HTTP. index.html:1 Error: A network error occurred. at file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:15483:11 at sendReq (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:15287:9) at $http.serverRequest (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:15021:16) at wrappedCallback (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:18435:81) at wrappedCallback (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:18435:81) at file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:18521:26 at Scope.$eval (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:19447:28) at Scope.$digest (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:19273:31) at Scope.$apply (file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:19553:24) at file:///Users/user/Projects/sideMenu/www/lib/ionic/js/ionic.bundle.js:8772:15 ionic.bundle.js:16905

lwenke avatar Apr 02 '14 06:04 lwenke

Chrome won't allow you to load remote assets unless you are on a server. You'll have to use some sort of static server

http://ionicframework.com/docs/guide/testing.html

ajoslin avatar Apr 02 '14 13:04 ajoslin

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 06 '18 07:09 ionitron-bot[bot]