angularjs - grunt serve VS opening index.html in browser -


i'm using yeoman , angular-fullstack generator bootstrap angular app. when grunt serve or grunt serve:dist works expected.

now question is, when open index.html file directly in browser, isn't supposed work equally?

so have hard time understanding whats tasks grunt executing here make work. or maybe missing else.

the console tells me:

get file:///app/8d57a97f.app.css net::err_file_not_found file:///app/47ab0f3e.vendor.js net::err_file_not_found file:///app/01b9b8a8.app.js net::err_file_not_found 

the generated index.html looks this:

<!doctype html>    <head>     <meta charset="utf-8">     <meta http-equiv="x-ua-compatible" content="ie=edge">     <base href="/">     <title></title>     <meta name="description" content="">     <meta name="viewport" content="width=device-width">     <link rel="stylesheet" href="app/8d57a97f.app.css"/>   </head>    <body ng-app="myapp">      <!-- functionality... -->       <script src="app/47ab0f3e.vendor.js"></script>     <script src="app/01b9b8a8.app.js"></script>   </body>  </html> 

the reason why this:

i try run angular app phonegap on android device. when load android mobile, screen remains blank. opened in browser , got same result.

so first attempt solve issue.

the problem <base href="/"> in header.

explanation can found here (loading local file in browser referenced css or js).


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -