diff options
Diffstat (limited to 'src/myview.js')
-rw-r--r-- | src/myview.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/myview.js b/src/myview.js index 026f563..d5c0484 100644 --- a/src/myview.js +++ b/src/myview.js @@ -1,10 +1,13 @@ import Backbone from 'backbone'; -import * as _ from 'underscore'; +import _ from 'lodash'; import $ from 'jquery'; import Mustache from 'mustache'; +import axios from 'axios'; +import Http from './http'; export default class MyView extends Backbone.View { + constructor() { super(); } @@ -13,11 +16,18 @@ export default class MyView extends Backbone.View { this.el = '#myarea'; 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() { - console.log(this.el) this.$el.html(Mustache.render(this.template)); } |