Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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