2017-12-20 13:36:12 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
|
2018-05-25 08:03:45 +00:00
|
|
|
class Controller {
|
2018-08-08 12:40:01 +00:00
|
|
|
constructor($http, $state) {
|
2017-12-21 13:09:55 +00:00
|
|
|
this.$http = $http;
|
|
|
|
this.$state = $state;
|
2018-02-20 13:30:02 +00:00
|
|
|
this.item = null;
|
2017-12-20 13:36:12 +00:00
|
|
|
}
|
2017-12-21 13:09:55 +00:00
|
|
|
|
2018-08-08 12:40:01 +00:00
|
|
|
_getCard() {
|
|
|
|
this.$http.get(`/item/api/Items/${this.$state.params.id}/getCard`).then(response => {
|
|
|
|
this.item = response.data;
|
2018-03-02 09:51:01 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
$onInit() {
|
2018-08-08 12:40:01 +00:00
|
|
|
this._getCard();
|
2018-03-02 09:51:01 +00:00
|
|
|
}
|
2017-12-20 13:36:12 +00:00
|
|
|
}
|
2018-05-25 08:03:45 +00:00
|
|
|
|
2018-08-08 12:40:01 +00:00
|
|
|
Controller.$inject = ['$http', '$state'];
|
2017-12-20 13:36:12 +00:00
|
|
|
|
|
|
|
ngModule.component('vnItemCard', {
|
2018-05-25 08:03:45 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
2017-12-20 13:36:12 +00:00
|
|
|
});
|