Angularjs 离子视图变为空白

Angularjs 离子视图变为空白,angularjs,ionic,angular-routing,Angularjs,Ionic,Angular Routing,我遇到了这个问题:我的Ionic应用程序有这个路由模式 $stateProvider .state('tab', { url: '/tab', abstract: true, templateUrl: 'templates/tabs.html' }) .state('tab.plazas', { url: '/plazas', views: { 'tab-plazas': { templateUrl:

我遇到了这个问题:我的Ionic应用程序有这个路由模式

$stateProvider
    .state('tab', {
    url: '/tab',
    abstract: true,
    templateUrl: 'templates/tabs.html'
})
    .state('tab.plazas', {
    url: '/plazas',
    views: {
        'tab-plazas': {
            templateUrl: 'templates/tab-plazas.html',
            controller: 'PlazasCtrl'
        }
    }
})
    .state('tab.plaza-detalle', {
    url: '/plazas/:plazaId',
    views: {
        'tab-plazas': {
            templateUrl: 'templates/plaza-detalle.html',
            controller: 'PlazaDetalleCtrl'
        }
    }
})

    .state('tab.plaza-diagrama', {
    url: '/plazas/diagramaPlaza/:plazaId',
    views: {
        'tab-plazas': {
            templateUrl: 'templates/diagrama.html',
            controller: 'DiagramaCtrl'
        }
    }
});
我想从plazas/:plazaId的内部进入/plazas/diagramaPlaza/:plazaId,但是当我尝试这样做时,应用程序变为空白,当我在桌面上测试应用程序时,它工作正常,但是当我构建应用程序并用手机测试它时,会出现白色屏幕

你知道这个问题的原因吗


非常感谢您的帮助。

我建议您首先为
路线配置配置一个其他方法,例如

$urlRouterProvider.otherwise('your default view');
如何转换到其他视图很重要,请尝试使用

$state.go('tab.plaza-diagrama');

这应该可以解决问题。

我建议您首先为
路由配置配置一个其他方法,例如

$urlRouterProvider.otherwise('your default view');
如何转换到其他视图很重要,请尝试使用

$state.go('tab.plaza-diagrama');

这应该可以解决你的问题。

Woow谢谢Damian,使用$state.go解决了我的问题(让我心烦意乱了两天的问题),非常感谢!Woow感谢Damian,使用$state.go解决了我的问题(这两天来一直困扰我的问题),非常感谢!