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
|
|
|
|
});
|