Search code examples
javascriptangularjsionic-frameworkmobileionic-native

Navigation issue in AngularJS app after switching from ngCordova to Ionic-Native


I am updating my hybrid mobile app from ngCordova to Ionic Native. My app uses the latest version of AngularJS, and the latest version of Ionic v1.

The problem I am having is with a ion-list of "buttons". Here is one of them:

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

When I was using ngCordova, this button would just redirect to the "about" view (#/about). Now, it just navigates over to a blank screen. No errors.

The url's are listed in the $stateProvider in my app.js file.

Does anyone know what might be the problem here?


Solution

  • Turns out my problem was with my ui-router. I had updated it to a new module and as a result I have to use 'ui-sref' instead of 'href' for pretty much everything. For more information, see: difference between using ui-sref and href(where to use) in ionic framework using ui-router service