This commit is contained in:
Joe Reeve
2015-11-07 14:39:44 +00:00
parent 1765a42699
commit 78b893b5f7
17 changed files with 64 additions and 62 deletions
+4 -4
View File
@@ -1,13 +1,13 @@
$(document).ready(function(){
Ractive.components.home = Ractive.extend({
template:'#home'
Ractive.components.student = Ractive.extend({
template:'#student'
});
$.getJSON('/sample', function(res){
$.getJSON('/data/'+location.pathname.split('/').slice(3).join('/'), function(res){
var ractive = new Ractive.components.home({
var ractive = new Ractive.components[location.pathname.split('/')[2]]({
el:'#load',
data:res
});