salix/client/item/src/create/item-create.js

19 lines
367 B
JavaScript

import ngModule from '../module';
class ItemCreate {
constructor() {
this.item = {};
}
onSubmit() {
this.$.watcher.submit().then(
json => this.$state.go('item.card.basic', {id: json.data.id})
);
}
}
ngModule.component('vnItemCreate', {
template: require('./item-create.html'),
controller: ItemCreate
});