Created
October 7, 2014 11:14
-
-
Save xcarpentier/f7fbc22ec19e24cd6d63 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* 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