Skip to content

Instantly share code, notes, and snippets.

@xcarpentier
Created October 7, 2014 11:14
Show Gist options
  • Save xcarpentier/f7fbc22ec19e24cd6d63 to your computer and use it in GitHub Desktop.
Save xcarpentier/f7fbc22ec19e24cd6d63 to your computer and use it in GitHub Desktop.
/**
* A éviter
*/
function Avengers(dataservice, logger) {
var vm = this;
vm.avengers = [];
vm.title = 'Avengers';
var activate = function() {
return getAvengers().then(function() {
logger.info('Activated Avengers View');
});
}
var getAvengers = function() {
return dataservice.getAvengers().then(function(data) {
vm.avengers = data;
return vm.avengers;
});
}
vm.getAvengers = getAvengers;
activate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment