blob: 026f5636f94fa0591f3ef6d8d1af03736de83ab1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import Backbone from 'backbone';
import * as _ from 'underscore';
import $ from 'jquery';
import Mustache from 'mustache';
export default class MyView extends Backbone.View {
constructor() {
super();
}
initialize() {
this.el = '#myarea';
this.$el = $(this.el);
this.template = 'Hello';
this.render();
}
render() {
console.log(this.el)
this.$el.html(Mustache.render(this.template));
}
}
|