2017-12-19 10:05:07 +00:00
|
|
|
import ngModule from '../module';
|
2017-12-19 13:28:19 +00:00
|
|
|
import './item-product';
|
2018-02-22 07:18:57 +00:00
|
|
|
import './style.scss';
|
2017-12-19 10:05:07 +00:00
|
|
|
|
2017-12-19 10:24:24 +00:00
|
|
|
class ItemList {
|
2018-02-22 07:18:57 +00:00
|
|
|
constructor($scope) {
|
|
|
|
this.$scope = $scope;
|
2017-12-19 10:05:07 +00:00
|
|
|
this.model = {};
|
2018-02-22 07:18:57 +00:00
|
|
|
this.itemSelected = null;
|
2017-12-19 10:05:07 +00:00
|
|
|
}
|
|
|
|
search(index) {
|
|
|
|
index.accept();
|
|
|
|
}
|
2018-02-22 07:18:57 +00:00
|
|
|
showItemPreview(item) {
|
|
|
|
this.itemSelected = item;
|
|
|
|
this.$scope.preview.show();
|
|
|
|
}
|
2017-12-19 10:05:07 +00:00
|
|
|
}
|
2018-02-22 07:18:57 +00:00
|
|
|
ItemList.$inject = ['$scope'];
|
2017-12-19 10:05:07 +00:00
|
|
|
|
2017-12-19 10:24:24 +00:00
|
|
|
ngModule.component('vnItemList', {
|
|
|
|
template: require('./list.html'),
|
|
|
|
controller: ItemList
|
2017-12-19 10:05:07 +00:00
|
|
|
});
|