【发布时间】:2017-10-30 12:39:07
【问题描述】:
我正在使用 Ionic v1,但遇到了问题。这个错误有很多头条新闻。但我找不到适合我的解决方案。
我愿意,
<ion-nav-view name="other" cache-view="false"></ion-nav-view>
和
$stateProvider.state('app', {
url: '/app',
cache: false,
abstract: true,
templateUrl: 'templates/menu.html',
controller: 'AppCtrl'
})
每次打开页面时运行控制器。但是我的网络服务代码只在第一次打开时运行
我的代码:
.controller('PlaylistsCtrl', function($scope, $rootScope, $http, $ionicPopup) {
$scope.loadingShow();
console.log("Test"); //Run everytime but $http run only first opened
$http.get($scope.webServiceUrl + "json_getSharedPicture.php")
.then(function(response) {
$scope.loadingHide();
$rootScope.playlists = response.data;
});
})
我的离子信息:
global packages:
@ionic/cli-utils : 1.2.0
Cordova CLI : 7.0.1
Ionic CLI : 3.2.0
local packages:
@ionic/cli-plugin-cordova : 1.2.1
@ionic/cli-plugin-ionic1 : 1.2.0
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic1 1.3.3
System:
Node : v6.10.3
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
【问题讨论】:
标签: angularjs node.js ionic-framework