From a7ccf2688f90f28754b8c61fa0b712d6465d2796 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Thu, 2 Nov 2017 15:47:14 +0530 Subject: HTTP - Axios integrated --- src/view.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/view.js') diff --git a/src/view.js b/src/view.js index 399ac03..860148f 100644 --- a/src/view.js +++ b/src/view.js @@ -4,6 +4,8 @@ import $ from 'jquery'; import Mustache from 'mustache'; import MyView from './myview'; +import Http from './http'; + export default class TestView extends Backbone.View { constructor() { @@ -13,7 +15,15 @@ export default class TestView extends Backbone.View { initialize() { this.el = 'li'; this.$el = $(this.el); - this.template = '
' + this.template = '
'; + + Http.service.get('test1').then(function (response) { + console.log(response); + }) + .catch(function (error) { + console.log(error); + }); + this.render(); } -- cgit v1.2.3