ionic当前页面刷新

    $scope.doRefreshLaborConstructionSub = function (item) {
      async.parallel([function (cb) {
        return Promise.promisify(laborService.getAllSubContractor)(item,  0, $scope.pagination.pageSize).then(function (sm) {
          var subs = !sm ? {} : sm.data;
          $scope.loadPurTask = subs;
          $scope.pagination.totalRow = sm.totalRow || 0;
          cb && cb(null, '1');
        });
      }], function (err, dataC) {
        $scope.$broadcast('scroll.refreshComplete');
      });
    };


    $scope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams){
      if(toState.name=='main.labor-construction-sub') {//指定当前路由,才执行刷新操作
        $scope.doRefreshLaborConstructionSub($scope.searchName)
      }
    });

你可能感兴趣的:(ionic当前页面刷新)