2017-12-21 13:09:55 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
|
2018-05-25 08:03:45 +00:00
|
|
|
class Controller {
|
2018-02-20 13:30:02 +00:00
|
|
|
constructor($scope, $timeout) {
|
|
|
|
this.$scope = $scope;
|
|
|
|
this.$timeout = $timeout;
|
|
|
|
}
|
2018-08-01 07:47:34 +00:00
|
|
|
|
2018-02-20 13:30:02 +00:00
|
|
|
$onChanges(data) {
|
2018-02-21 12:15:50 +00:00
|
|
|
this.$timeout(() => {
|
|
|
|
this.$scope.watcher.data = data.item.currentValue;
|
|
|
|
});
|
2018-02-20 13:30:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-25 08:03:45 +00:00
|
|
|
Controller.$inject = ['$scope', '$timeout'];
|
2018-02-20 13:30:02 +00:00
|
|
|
|
2019-04-16 12:30:01 +00:00
|
|
|
ngModule.component('vnItemBasicData', {
|
2018-05-25 08:03:45 +00:00
|
|
|
template: require('./index.html'),
|
2017-12-21 13:09:55 +00:00
|
|
|
bindings: {
|
|
|
|
item: '<'
|
2018-02-20 13:30:02 +00:00
|
|
|
},
|
2018-05-25 08:03:45 +00:00
|
|
|
controller: Controller
|
2017-12-21 13:09:55 +00:00
|
|
|
});
|