blob: a7e9c233ae02b7d692dd2279b153fcb14ef3cb94 (
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
27
28
29
30
31
32
33
34
35
36
37
|
import Backbone from 'backbone';
import _ from 'lodash';
import $ from 'jquery';
import Mustache from 'mustache';
import axios from 'axios';
import Http from './http';
import template from './views/template.html';
export default class MyView extends Backbone.View {
constructor() {
super();
}
initialize() {
this.el = '#myarea';
console.log(template);
this.$el = $(this.el);
this.template = 'Hello';
Http.service.get('olapa')
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
this.render();
}
render() {
this.$el.html(Mustache.render(template,{data:'This is a sample. sdfhd'}));
}
}
|