TabsController - Resolution error with $state.go()


#1

Hi there,

I am building an app, in Creator, with a tab bar. I am having a really hard time using the TabsController…

I have a page “dashboard” as the default page for my my tab “dashboard” ; sref is tabsController.dashboard

In my login page, when user successfully logs in he gets redirected to the dashboard page : $state.go('tabsController')

I made sure that $state gets injected in my controller.

Everything is working and suddenly brokes. I rebuilt the app from start, it is working for a moment and then brokes, returning the following error:
Could not resolve ‘tabsController.dashboard’ from state ‘login’

I exported the project and I see this in the routes.js :

     .state('tabsController.dashboard', {
      url: '/dashboard',
      views: {
        'tab1': {
          templateUrl: 'templates/dashboard.html',
          controller: 'dashboardCtrl'
        },
        'tab4': {
          templateUrl: 'templates/dashboard.html',
          controller: 'dashboardCtrl'
        }
        }
      }) 

Could this be the problem? How could I edit the routes in Creator?

Thank you in advance for your help.

Manuel


#2

I’ll be interested in the solution as well.

I ended up removing tabs by disabling parenting on all screens/pages and it started working.

Not the best solution if you want tabs though.


#3

Did you try this?
$state.go(‘tabsController.dashboard’);

I redirect my views to another tab like this…