2017-06-05 07:01:21 +00:00
|
|
|
import {module} from '../module';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The main application class.
|
|
|
|
*
|
|
|
|
* @property {String} name The application name.
|
|
|
|
* @property {Snackbar} snackbar The main object to show messages.
|
|
|
|
*/
|
|
|
|
export default class App {
|
|
|
|
show(message) {
|
2017-08-30 13:39:48 +00:00
|
|
|
if (this.snackbar) this.snackbar.show({message: message});
|
2017-06-05 07:01:21 +00:00
|
|
|
}
|
|
|
|
showMessage(message) {
|
|
|
|
this.show(message);
|
|
|
|
}
|
|
|
|
showError(message) {
|
|
|
|
this.show(`Error: ${message}`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
module.service('vnApp', App);
|