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

19 lines
367 B
JavaScript
Raw Normal View History

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