client/views: refactor rendering

This commit is contained in:
rr-
2016-04-08 10:35:38 +02:00
parent 7871c69aa3
commit 0ceaa8da42
15 changed files with 147 additions and 97 deletions

View File

@ -8,8 +8,10 @@ class UserSummaryView extends BaseView {
this.template = this.getTemplate('user-summary-template');
}
render(options) {
options.target.innerHTML = this.template(options);
render(ctx) {
const target = ctx.target;
const source = this.template(ctx);
this.showView(target, source);
}
}