Created
October 7, 2014 11:15
-
-
Save xcarpentier/2802200e857dbdf8889e 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
/** | |
* Recommandé | |
*/ | |
function Avengers(dataservice, logger) { | |
var vm = this; | |
vm.avengers = []; | |
vm.getAvengers = getAvengers; | |
vm.title = 'Avengers'; | |
activate(); | |
function activate() { | |
return getAvengers().then(function() { | |
logger.info('Activated Avengers View'); | |
}); | |
} | |
function getAvengers() { | |
return dataservice.getAvengers().then(function(data) { | |
vm.avengers = data; | |
return vm.avengers; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment