Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs ionic$stateprovider在设备上显示空白页_Angularjs_Ionic - Fatal编程技术网

Angularjs ionic$stateprovider在设备上显示空白页

Angularjs ionic$stateprovider在设备上显示空白页,angularjs,ionic,Angularjs,Ionic,为什么这个示例代码在浏览器上工作,但在ios模拟器或设备上测试时显示空白页 .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('eventmenu', { url: '/event', abstract: true, templateUrl: 'templates/event-menu.html' }) .sta

为什么这个示例代码在浏览器上工作,但在ios模拟器或设备上测试时显示空白页

.config(function($stateProvider, $urlRouterProvider) {

    $stateProvider
    .state('eventmenu', {
        url: '/event',
        abstract: true,
        templateUrl: 'templates/event-menu.html'
    })
    .state('eventmenu.home', {
        url: '/home',
        views: {
            'menuContent' :{
                templateUrl: 'templates/home.html'
            }
        }
    })
    .state('eventmenu.checkin', {
        url: '/check-in',
        views: {
            'menuContent' :{
                templateUrl: 'templates/check-in.html',
                controller: 'CheckinCtrl'
            }
        }
    })
    .state('eventmenu.attendees', {
        url: '/attendees',
        views: {
            'menuContent' :{
                templateUrl: 'templates/attendees.html',
                controller: 'AttendeesCtrl'
            }
        }
    })

    $urlRouterProvider.otherwise('/event/home');
})

如何将其部署到设备上?使用ionic cli ionic build ios,然后运行xcode项目您是否能够解决此问题?