尝试使用onsen-ui在iphone / android应用程序中转换使用纯angularjs创建的Web应用程序。
我的问题是我在系统的各个页面中使用$ routeParams:
居
.when('/request_details/:request_id',
{
templateUrl: 'RequestDetailsControllerView.html'
})
.when('/wizard_request/:service/:request_id',
{
templateUrl: 'WizardOfferController.html'
})
.when('/wizard_request/:service',
{
templateUrl: 'WizardOfferController.html'
})
所以我需要使用onsen-ui navigator命令将它传递给我的控制器
ons.navigator.pushPage('page2.html')
可以在不更改我的控制器的情况下这样做,这样我可以保持相同的结构吗?
答案 0 :(得分:1)
我认为采用ngRoute的方式并不是Onsen UI主要支持的。如果要使用ngRoute,可以使用纯AngularJS和ngRoute创建应用程序。 因此,如果您使用Onsen UI,我认为您最好遵循Onsen UI提供的页面转换方式。