Skip to content

Instantly share code, notes, and snippets.

@csprocket777
csprocket777 / EmberJS App Prefs from JSON file
Last active December 19, 2015 00:28
This gist shows how to load in a json file into a single page EmberJS app as a "preferences" file and have it be persistent. I arrived on this code by trial and error during my learning of emberJS so it's probably got issues and could be more elegant. Thought it helpful to document it somewhere.
Env.IndexRoute = Ember.Route.extend({
model: function(){
return $.ajax({
url: "data/player.json",
dataType: "jsonp",
jsonpCallback:'playerData',
crossDomain: true
});
},
setupController: function( controller, model )