[英]Ionic - $state.go works on livereload but not on device
I am experiencing a weird issue with the following. 我遇到了以下奇怪的问题。 On livereload or on browser, state.go function works properly as expected.
在livereload或浏览器上,state.go函数按预期正常工作。 However when I run the app on device (without livereload), the app do not apply the transition to the new state.
但是,当我在设备上运行应用程序(没有livereload)时,应用程序不会将转换应用于新状态。
This is how I call the function: 这就是我调用函数的方式:
<ion-nav-buttons side="right"><a class="button button-clear navButtons" ng-click="setSelectedForEdit(selectedChannel)">DÜZENLE</a></ion-nav-buttons>
And this is the controller: 这是控制器:
.controller('ChannelCtrl', function($scope, $rootScope, $stateParams, $state, firebaseDataService) {
$scope.setSelectedForEdit = function(channelUniqueID) {
$state.go('app.channel-edit', {'channelId':channelUniqueID});
};
})
And my route the following: 我的路线如下:
.state('app.channel-edit', {
url: '/channels/:channelId/edit',
views: {
'menuContent': {
templateUrl: 'templates/ChannelEdit.html',
controller: 'ChannelEditCtrl'
}
},
cache: false
})
Anybody have experienced the same before? 以前有人经历过同样的经历吗?
I had the same problem. 我有同样的问题。 The file of one of my controllers started with uppercase, I changed it to lowercase and this solved my issue.
我的一个控制器的文件以大写字母开头,我把它改成小写,这解决了我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.