Skip to content

Instantly share code, notes, and snippets.

@petersirka petersirka/update.js
Last active Apr 21, 2016

Embed
What would you like to do?
Pomocník
COMPONENT('comments', function() {
var self = this;
self.readonly();
self.rebuild = function() {
AJAX('GET .....', function(response, err) {
if (err)
return;
// akože urobíme nejakú operáciu s Array
response.reverse();
// renderujeme
self.setter(response);
});
};
self.setter = function(value) {
if (!value)
return;
self.html('RENDER');
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.