1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-17 21:29:13 +00:00

Added frontend pages and trying to model wrestlers on frontend

This commit is contained in:
2016-04-26 01:14:15 +00:00
parent 5b9f64b3f9
commit 84578d89da
9 changed files with 79 additions and 40 deletions

View File

@@ -0,0 +1,19 @@
'use strict';
app.factory('Wrestler', function Wrestler(){
var vm = this;
vm.matches = function(matches,wrestler){
var givenWrestler = wrestler;
console.log(givenWrestler.id);
return _.filter(matches, function(match){
return match.w1 == givenWrestler.id || match.w2 == givenWrestler.id;
});
}
return vm;
});