salix/modules/item/front/basic-data/index.js

25 lines
495 B
JavaScript

import ngModule from '../module';
class Controller {
constructor($scope, $timeout) {
this.$scope = $scope;
this.$timeout = $timeout;
}
$onChanges(data) {
this.$timeout(() => {
this.$scope.watcher.data = data.item.currentValue;
});
}
}
Controller.$inject = ['$scope', '$timeout'];
ngModule.component('vnItemBasicData', {
template: require('./index.html'),
bindings: {
item: '<'
},
controller: Controller
});