Ionic beta:14 doesn't route

After changing to beta14 my app stops working. After some authenticationprocessing in a controller I do: $state.go(‘main’);
In the adresbar I see the correct url. But nothing happens. In Chrome webtools I dont see errors. This was no problem in beta13.
My guess it is caused by the template connected to the controller in router.

Anybody has same Experience?

sounds your state is invalid (wrong connected view or template).

If the url changes, the routing works.

you can add
$rootScope.$on(‘stateChangeStart’, function (event, toState, toParams, fromState, fromParams) {
// log to and fromState to check redirection
});

There are two more very interesting events:
stateChangeSucces, stateChangeError

Hi thanks for helping me!

I’ve tried to install the listener:

    $rootScope.$on('stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
console.log('EVENT stateChangeStart: ', event, toState, toParams, fromState, fromParams);
    });

on controller and on run.
I dont see message from the events. What is wrong??

You should put this in a parent controller (like your main controller) not in the Target-state controller.

I’d suggest using $stateChangeError as well in your .run. It will tell you about missing templates,etc.

$rootScope.$on("$stateChangeError", function (event, toState, toParams, fromState, fromParams, error) {

...

});

There must be something wrong with events. I tried to put the listeners in all controllers and in run. The console doesn’t log the messages. Long ago I used state events to debug. Now it simple doesn’t work.
I tried also with Ionic beta.13

@bengtler I found what the problem was with installing the eventListener. It was a $ sign in front of the eventname!!!

The stateChange is OK. With no errors.

In the beginning I allready suggested the problem I have is something with the template…

@Calendee This event does not fire. But the $stateChangeStart fires. See former reply to @bengtler

I go on searching what could be wrong with the used template.

Can you share a code snippet if not a full blow Codepen sample? Maybe just paste in the $stateProvider section, the controller, and template?

Error reporting is really poor now. yesterday I actually forgot to inject $window and there was no errors in the console. I just got a white screen.

I am guessing your problems might be due to error in resolving data needed for the states. Paste the code of your service / factory and your state resolvers

We are also facing the same issue after upgrading to Beta 14. At the very first time we are able to navigate to any module but while coming back to same URL or while refreshing, URL is changing as expected but page is not navigating to the previously accessed module content.

In my case it is related to a template with a sidemenu. If I replace this template with a simple html page routing is working.
If I replace my sidemenu with the one from the sidemenu example route doesn’t work.
So now I’ m stuck. I switch back to beta.13. Beta13 is working fine.
I hope somebody from the Ionic team is reading this issue and dive into it.

@pcr We just replaced our ionic scss folder with the nightly build scss folder and now it is working fine as _transitions.scss and some other files are missing in Beta 14 release

Hey there.

So the issue is coming from how the navigation changes.

Components like tabs and side-menus are much more opinionated in beta14.
They’ve become more navigation hub/base centric, same as they would be in native apps.

@makhija_09: _transitions.scss is included with the beta14 release. Not sure what happened with your’s.

@mhartington What does that mean to me. Do I have to change something in my code.
BTW I’ve tried the Ionic latest-build. Doesn’t work.

@mhartington please let me know what to do?
Is it a problem with beta.14 or is het my code that needs corrected?

Thanks

Hey sorry, EST(-5), just getting to the forum today.

If you are using a side-menu for a contextual menu, and not a navigation hub, you may need to rethink your apps UI a bit. Components like popover’s and modals could be used instead.

This is a big chang. But OK, I replaced the sidemenu by a modal. This workshop also as it should be. Now I want to add a sidemenu again to navigatie thru the app. But as soon as I add a sidemenu I have the same problem. Even I only put empty sidemenudurectives. Is there some I did not know??

@mhartington what does that mean indeed!?

I have a side menu that changes depending on authenticated or not.
All works fine in -13 but in -14 my ion-view/ion-content template gets rendered but is not ‘angularized’: i.e. {{ '?' }} comes out as {{ ‘?’ }} instead of ?

As a hint, all the ui-router events fire fine without errors and the URL’s get updated but navigating is busted e.g. $state.go() updates the URL but not the view. I need to refresh my page, then the view is fine but not augularized

I tried to trim it down to a codepen but it’s too intricate…

I’d like to debug it but none of the $ionview. events seem to fire (maybe I .$on them wrong)

Stuck at -13 for now… :frowning:

@mhartington
Because if I create a ionic app with start sidemenu, the sidemenu works fine. So there must be a way to solve the problem.
We need more instructions about how to deal with sidemenu.