aboutsummaryrefslogtreecommitdiff
path: root/src/view.js
diff options
context:
space:
mode:
authorIndrajith K L2017-11-02 15:47:14 +0530
committerIndrajith K L2017-11-02 15:47:14 +0530
commita7ccf2688f90f28754b8c61fa0b712d6465d2796 (patch)
tree7c1d7aa19a9ab5349078b0a84e7d4b6e588d2de5 /src/view.js
parent70a7e6c3c2019346ea8ad5c52feb464efa0531e5 (diff)
downloades6-backbone-a7ccf2688f90f28754b8c61fa0b712d6465d2796.tar.gz
es6-backbone-a7ccf2688f90f28754b8c61fa0b712d6465d2796.tar.bz2
es6-backbone-a7ccf2688f90f28754b8c61fa0b712d6465d2796.zip
HTTP - Axios integrated
Diffstat (limited to 'src/view.js')
-rw-r--r--src/view.js12
1 files changed, 11 insertions, 1 deletions
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 = '<div id="myarea"></div>'
+ this.template = '<div id="myarea"></div>';
+
+ Http.service.get('test1').then(function (response) {
+ console.log(response);
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+
this.render();
}