$ionicView.beforEnter
// 页面刚加载前
//$scope.$on('$ionicView.beforeEnter', function() {
// $scope.myLocalChats_Key = User.getlogin().memberid;//根据本人的用户编号设置
// console.log("读取本地存储的消息列表:" + $scope.myLocalChats_Key);
// var model = localStorage.getItem($scope.myLocalChats_Key); // 获取本地存储的消息列表
// //localStorage.setItem(key, JSON.stringify(model));//存储到本地
// if(IS_NUll(model)){
// console.log("本地消息列表 is null");
// }else{
// console.log(model);
// $rootScope.pushList = JSON.parse(model);
// }
//});
$scope.$on("$viewContentLoaded", function(){
console.log("lllllllllllllllllllllllllllllllllll");
});
// 监听页面加载完成事件
$scope.$watch('$viewContentLoaded',function(){
// 初始化地图
console.log("2222222222222222222222222222222222222");
});
cordova:
https://segmentfault.com/a/1190000003013808#articleHeader10
http://bbs.phonegap100.com/forum.php?mod=viewthread&tid=2163
// 页面刚加载前
//$scope.$on('$ionicView.beforeEnter', function() {
// $scope.myLocalChats_Key = User.getlogin().memberid;//根据本人的用户编号设置
// console.log("读取本地存储的消息列表:" + $scope.myLocalChats_Key);
// var model = localStorage.getItem($scope.myLocalChats_Key); // 获取本地存储的消息列表
// //localStorage.setItem(key, JSON.stringify(model));//存储到本地
// if(IS_NUll(model)){
// console.log("本地消息列表 is null");
// }else{
// console.log(model);
// $rootScope.pushList = JSON.parse(model);
// }
//});
$scope.$on("$viewContentLoaded", function(){
console.log("lllllllllllllllllllllllllllllllllll");
});
// 监听页面加载完成事件
$scope.$watch('$viewContentLoaded',function(){
// 初始化地图
console.log("2222222222222222222222222222222222222");
});
cordova:
https://segmentfault.com/a/1190000003013808#articleHeader10
http://bbs.phonegap100.com/forum.php?mod=viewthread&tid=2163