Created
September 26, 2014 14:27
-
-
Save DrMabuse23/35d20012d83d566c43e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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