2 zilu wang zilu_wang 于 2016.03.29 12:00 提问

AngluarJS 中$reactive的用法?.getReactively又是什么意思? 2C

return {
restrict: 'E',
templateUrl: 'client/machines/program-information/program-information.html',
controllerAs: 'programInformation',
controller: function ($scope, $stateParams, $reactive) {
$reactive(this).attach($scope);

this.perPage =7;
this.page = 1;
this.sort = {
time: -1
};

this.orderProperty = '1';

          this.machineId = $stateParams.machineId;


          this.subscribe('programRecords', () => {
           return [
          {
            limit: parseInt(this.perPage),
            skip: parseInt((this.getReactively('page') - 1) * this.perPage),
            sort: this.getReactively('sort')
          },
          this.getReactively('machineId')
        ]
      });
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!