# An issue using $state.go

**URL:** <https://forum.ionicframework.com/t/an-issue-using-state-go/49202>\
**Category:** ionic-v1\
**Created:** [April 13, 2016, 2:01pm UTC](https://forum.ionicframework.com/t/an-issue-using-state-go/49202 "2016-04-13T14:01:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ordekci](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ordekci/32/92737_2.png) [@ordekci](https://forum.ionicframework.com/u/ordekci)\
**Post date:** [April 13, 2016, 2:01pm UTC](https://forum.ionicframework.com/t/an-issue-using-state-go/49202/1 "2016-04-13T14:01:02Z")

</div>

Hi. I use $state.go for navigation between views. Before navigation, I control internet connectio like below:

> if('window.isOnline()){  
> $cordovaToast.showLongCenter(“No internet connection”);  
> retun;  
> }  
> $state.href(“xxx”);

I also used var **$ionicPlatform.registerBackButtonAction** method in my app. My problem is that, when I route using $state.go to a view, registerBackButtonAction method does not work. I can not find what the problem or wrong thing is.  
Can someone help about this?  
Thank in advance.
