From 8e4009cf8d05a5ce5e007bf6dad183dc4be27f32 Mon Sep 17 00:00:00 2001 From: John Cleaver Date: Wed, 16 Mar 2016 23:19:46 -0400 Subject: [PATCH] Updated the Javascript to load the JSON data. --- main.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 7d29951..9012a46 100644 --- a/main.js +++ b/main.js @@ -1,5 +1,22 @@ -v = new Vue({ - el: '#app' +var v = new Vue({ + el: '#app', + data:{ + debug: true, + static: null, + user_data: [] + }, + ready: function(){ + this.fetchData(); + }, + methods: { + fetchData: function(){ + this.$http.get('bundles.json', function(data, status, response){ + if(status == 200){ + this.static = data; + } + }); + } + } }); $(function() {