Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 18, 2014 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/f174da7efe472c145069 to your computer and use it in GitHub Desktop.
Save devdays/f174da7efe472c145069 to your computer and use it in GitHub Desktop.
Single Page App - Loading JSON from Sammy
this.around(function (callback) {
var context = this;
this.load('data/3-products.txt', { json: true, cache: true })
.then(function (items) {
context.items = items;
console.log("loaded: " + JSON.stringify(context.items));
})
.then(callback);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment