【问题标题】:live reload running but ionic serve dont实时重新加载运行但离子服务不
【发布时间】:2015-08-04 15:47:40
【问题描述】:

我是离子框架的新手。我已经安装了所有使用离子盒的功能(如http://therockncoder.blogspot.com.br/2014/10/getting-started-building-mobile-apps.html 所示),但我的离子服务没有运行。

下面我显示了错误的浏览器:

这里是我的命令,显示实时重新加载正在工作。我更改了 index.html 中的任何内容,并显示一条消息,告知网站已更改。

这是我的 index.html 文件,没有任何更改:

<!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>

在安装完所有东西后,我做了这些步骤:

  • vagrant ssl
  • cd /projects(我的项目文件夹有这个名字)
  • 离子启动 PROJECT_NAME_HERE 选项卡
  • cd PROJECT_NAME
  • 离子服务

这些步骤我也试过了:

  • vagrant ssl
  • cd /projects(我的项目文件夹有这个名字)
  • 离子启动 PROJECT_NAME_HERE 选项卡
  • cd PROJECT_NAME
  • 离子平台添加android
  • 离子服务

我还尝试了命令“离子地址”在 2 个 url 选项(本地主机和 IP 地址)之间进行更改。两者都存在同样的问题。

我做错了什么?

谢谢。

【问题讨论】:

  • 你试过了吗:localhost:8100/#
  • 您使用的是最新版本的 ionic 吗?您可以通过在您的 cmd 中输入:ionic -v 来检查。如果不更新:npm install -g ionic 并通过在项目的根目录中执行 ionic lib update 来更新项目中的离子库。

标签: ionic-framework


【解决方案1】:

试试这个:

离子服务 --address 0.0.0.0

【讨论】:

  • 这是做什么的??为什么?
猜你喜欢
  • 2017-07-02
  • 1970-01-01
  • 2015-08-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-08-26
  • 2014-05-29
  • 1970-01-01
相关资源
最近更新 更多