我是这个离子领域的新人。我在localhost文件夹(C:\ xampp \ htdocs)中创建了一个新应用程序。当我去" http://localhost/ionapp/www/"一切正常,但当我从"离子服务"命令我得到空白页面。 当我查看页面源时,我发现离子发送期间没有加载ionic.css和ionic.bundle.js文件。在控制台中,我得到错误,如"角度未定义"。有人可以帮我解决这个问题吗?
这是我的index.html,它应该加载css和js文件
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
</head>
<body ng-app="starter">
<!--
The nav bar that will be updated as we navigate between views.
-->
<ion-nav-bar class="bar-stable">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<!--
The views will be rendered in the <ion-nav-view> directive below
Templates are in the /templates folder (but you could also
have templates inline in this html file if you'd like).
-->
<ion-nav-view></ion-nav-view>
</body>
</html>
答案 0 :(得分:0)
所以这不是我的离子问题,而是我的浏览器。结果我在我的控制台中得到了ERR_CONNECTION_RESET
。基本上我所做的就是
netsh winsock reset
。我不知道它是怎么发生的,但它解决了我所有的问题。