22 lines
521 B
JavaScript
22 lines
521 B
JavaScript
|
import ngModule from '../module';
|
||
|
import Section from 'salix/components/section';
|
||
|
|
||
|
class Controller extends Section {
|
||
|
constructor($element, $) {
|
||
|
super($element, $);
|
||
|
}
|
||
|
|
||
|
async $onInit() {
|
||
|
this.$state.go('item.card.summary', {id: this.$params.id});
|
||
|
window.location.href = await this.vnApp.getUrl(`item/${this.$params.id}/diary`);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
ngModule.vnComponent('vnItemDiary', {
|
||
|
template: require('./index.html'),
|
||
|
controller: Controller,
|
||
|
bindings: {
|
||
|
item: '<'
|
||
|
}
|
||
|
});
|