Skip to content

Instantly share code, notes, and snippets.

@DrMabuse23
Created September 26, 2014 14:27
Show Gist options
  • Save DrMabuse23/35d20012d83d566c43e3 to your computer and use it in GitHub Desktop.
Save DrMabuse23/35d20012d83d566c43e3 to your computer and use it in GitHub Desktop.
/**
* Created by pascal on 26.09.14.
* @name StorageList
*/
'use strict';
requirejs(['can/util/library', 'can/control','can/model','can/route','can/map'], function(can){
var APIURL = 'test';
/**
* the penglr api
*/
var API = can.Model({
findOne:'Get '+APIURL+'/recent',
findAll:'Get '+APIURL+'/pages/{nextPageID}'
}, {});
can.route.ready();
var History = can.Control({
init: function(el, options) {
var self = this;
var api = new API();
API.findOne({},function(recent){
console.log('recent',recent);
});
}
});
can.route.attr('action','history');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment