osmos
Version:
OSMOS - Symbiosys
28 lines (21 loc) • 485 B
JavaScript
import { inject } from 'aurelia-framework';
export class RequestState{
loading = false;
errors = [];
constructor(errorParser){
this._errorParser = errorParser;
console.info('this._errorParser', this._errorParser);
}
init(){
this.loading = true;
this.errors = [];
}
reset(){
this.loading = false;
this.errors = [];
}
error(error){
this.loading = false;
this.errors = this._errorParser.set(error);
}
}