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