Ionic view app $state.go and ui-sref not working

Hi,

I have a problem when I try change view on the ionic view app for IO’S ( I don’t prove the android app). I see that is a app bug and it have solution but this don’t work for me.

info bug : https://blog.appery.io/2015/09/how-to-fix-ios9-angular-webview-issue/
info bug 2: http://blog.ionic.io/ios-9-potential-breaking-change/

my ionic info is:

Cordova CLI: 5.3.3
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.7
Ionic App Lib Version: 0.6.3
ios-deploy version: 1.8.2
ios-sim version: 5.0.2
OS: Mac OS X El Capitan
Node Version: v4.1.1
Xcode version: Xcode 7.0.1 Build version 7A1001

and my app.js is:

$stateProvider

      .state('landing', {
        url: '/',
        templateUrl: 'templates/landing/landingView.html',
        controller: 'landingController'
      })
      .state('login', {
        url: '/login',
        templateUrl: 'templates/landing/login/loginView.html',
        controller: 'loginController'
      })
      .state('register', {
        url: '/register',
        templateUrl: 'templates/landing/register/registerView.html',
        controller: 'registerController'
      })
      .state('forget', {
        url: '/forget',
        templateUrl: 'templates/landing/forget/forgetView.html',
        controller: 'forgetController'
      })
      .state('index', {
        abstract: true,
        //url: '/',
        views: {
          '@' : {
            templateUrl: 'templates/abstractView.html',
            controller: 'AppCtrl'
          },
          'sideNavMenu@index': {
            templateUrl: 'templates/modules/sideBar/sideNavBar.html',
            controller: 'sideNavController'
          },
          'footerMenu@index': {  //tabs views
            templateUrl: 'templates/modules/footerMenu/footerMenu.html',
            controller: 'footerMenuController'
          }
        }
      })
      .state('tab1', {
        parent: 'index',
        abstract:true,
        url: '/tab1',
        views: {
          'tab1View@index': {
            templateUrl: 'templates/tab1/tttt.html',
            controller: 'tabs1Controller'
          }
        }
      })
      .state('tab2',{
          parent: 'tab1',
          url: '/tab2',
          views:{
              'tab2View@index': {
                  templateUrl: 'templates/tab2/tttt.html',
                  controller: 'tab2Controller'
              }
          }
      })
      .state('tab3',{
          parent: 'tab1',
          url: '/tab3',
          views:{
              'tab3View@index': {
                  templateUrl: 'templates/tab3/tttt.html',
                  controller: 'tab3Controller'
              }
          }
      })
      .state('tab4',{
          parent: 'tab1',
          url: '/tab4',
          views:{
              'tab4View@index': {
                  templateUrl: 'templates/tab4/rrr.html',
                  controller: 'tab4Controller'
              }
          }
      })

      .state('subtabs', { //tabs inside tabs
        parent: 'tab1',
        abstract:true,
        url: '/subtabs'
      })
      .state('subtabs.subtab1',{
        parent: 'subtabs',
        url: '/subtab1',
        views: {
          'subtab1@mobile': {
            templateUrl: 'templates/subtab/tab1/tab1.html',
            controller: 'subtab1Controller'
          }
        }
      })
      .state('subtabs.subtab2',{
        url: '/subtab2',
        views: {
          'etcetc@torneos.disponibles':{
            templateUrl: 'templates/subtab2/subtabs21/ssss.html',
            controller: 'subtab21Controller'
          },
          'etc1etc2@mobile': {
            templateUrl: 'templates/subtab2/subtabs22/ddddd.html',
            controller: 'subtab22Controller'
          }

        }
      })
      .state('subtabs.subtab3',{
        parent: 'subtabs',
        url: '/subtab3',
        views: {
          'etcetc3@mobile': {
            templateUrl: 'templates/subtab/subtabs3/asdasd.html',
            controller: 'subtab3Controller'
          }
        }
      })

Obviously, the names and dirs are fakes… this state with real names works for me, I only want explain the idea.
I have a one landing with : login,register,etc views and when I pass this views after go to the index page etc etc,
this index page is a abstract view with tabs (4 tabs) and in one tab have tabs inside again.
I render tabs with subviews for module it.
My problem is that in the browser, and Xcode debug simulation, etc it works… but in the ionic view app don’t work. (I try patch and is not working at all).
I prove this with href , ui-sref, state.go() … and nothing.
I need help please

Thanks!! =)

how do you use it? I mean how do you do the call to state.go or ui-sref

1 Like

I use with ui-sref and Href and state.go(), this works in all enviroments debuggin but the Ionic View APP doesn’t works… I read that is a bug for app … but I want know if my case have a solution!

Ok, First of all always use ui-sref because Ionic uses ui-router then href is not recommended in that way.
More state.go() is the javascript version of ui-sref but with more power and more controllable.

Finally about Ionic View APP I never used it, but I will recommend you to directly build you app on and iPhone with Cordova instead of using third party project. You lost time for nothing.

It’s up to you, maybe it’s a client requirement then good luck otherwise my philosophie is “DIY” as do it yourself.

Cheers,

Thanks!
yes… in this moment is lost time… it was another way to show the result app
but build the app is another solution and I works fine when I build It…
thanks!
and one moment, what is the better way for animations transitions in views for you? Is a question for improve my skills!!
for me the angular natural transitions ‘slide-left-right, etc etc’ don’t work, I have to do with animate.css for example.
I’m not implement the animations yet, but know how to do on future

the easiest way for animated in angular, is using animate.css. But if you want to go further, then you can create your own js animation class, but I can’t explain it right now.

the better / easier way is animate.css

good luck

jajajajajaja
nothing happens, I understand you!! This way is better for me too! but I want know the other way to think for learn something! :slight_smile:

thanks very much !!