54e3099c56
- Controller lifetime is bound to route lifetime - View lifetime is bound to controller lifetime - Control lifetime is bound to view lifetime - Enhanced event dispatching - Enhanced responsiveness in some places - Views communicate user input to controllers via new event system
21 lines
467 B
JavaScript
21 lines
467 B
JavaScript
'use strict';
|
|
|
|
const views = require('../util/views.js');
|
|
|
|
const template = () => {
|
|
return views.htmlToDom(
|
|
'<div class="wrapper"><div class="messages"></div></div>');
|
|
};
|
|
|
|
class EmptyView {
|
|
constructor() {
|
|
this._hostNode = document.getElementById('content-holder');
|
|
views.replaceContent(this._hostNode, template());
|
|
}
|
|
|
|
showError(message) {
|
|
views.showError(this._hostNode, message);
|
|
}
|
|
}
|
|
|
|
module.exports = EmptyView;
|