Created
December 12, 2014 14:53
-
-
Save xcarpentier/26b52ddebdfdf3e2f730 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
angular | |
.module('app') | |
.controller('Avengers', Avengers); | |
/* @ngInject */ | |
function Avengers (storageService, avengerService) { | |
var vm = this; | |
vm.heroSearch = ''; | |
vm.storeHero = storeHero; | |
function storeHero(){ | |
var hero = avengerService.find(vm.heroSearch); | |
storageService.save(hero.name, hero); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment