Created
December 12, 2014 14:57
-
-
Save xcarpentier/3976370a18953c1da016 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); | |
} | |
} | |
Avengers.$inject = ['storageService', 'avengerService']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment