javascript - 从 ngCordova 切换到 Ionic-Native 后 AngularJS 应用程序中的导航问题

标签 javascript angularjs ionic-framework mobile ionic-native

我正在将我的混合移动应用程序从 ngCordova 更新为 Ionic Native。我的应用程序使用最新版本的 AngularJS 和最新版本的 Ionic v1。

我遇到的问题是“按钮”的 ionic 列表。这是其中之一:

<ion-item nav-clear menu-close href="#/about" class="menu nav-menu" ng-class="{active: $state.is('about')}>
  <div class="item-text-wrap">
    {{'NAV_ABOUT' | translate}}
  </div>
</ion-item>

当我使用 ngCordova 时,此按钮只会重定向到“关于” View (#/about)。现在,它只是导航到空白屏幕。没有错误。

网址列在我的 app.js 文件的 $stateProvider 中。

有谁知道这里可能出现什么问题吗?

最佳答案

事实证明我的问题出在我的用户界面路由器上。我已将其更新为新模块,因此我必须使用“ui-sref”而不是“href”来处理几乎所有内容。有关更多信息,请参阅: difference between using ui-sref and href(where to use) in ionic framework using ui-router service

关于javascript - 从 ngCordova 切换到 Ionic-Native 后 AngularJS 应用程序中的导航问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58596767/

相关文章:

javascript - 来自 Promise.all 的值并不总是由 Angular 解释

Javascript 函数未在 Angular App 中返回值

css - 在 HTML5 应用程序中开始播放 MP4 视频之前获得一个丑陋的大播放按钮

javascript - 使用 xhr 请求 Google Place API 遇到 CORS 问题

javascript - 如何在 jQuery Mobile 中构造元素

javascript - Node js 在日期上使用错误的格式

c# - MVC 3 级联下拉列表

angularjs - Chrome 开发者工具中未定义 Angular

angular - 从 Controller Ionic 2 更改元素样式

javascript - ionic ngElse equal