Skip to content

Instantly share code, notes, and snippets.

@luisangelma
Created August 4, 2015 00:46
Show Gist options
  • Select an option

  • Save luisangelma/c6de3cf678d55aeb3051 to your computer and use it in GitHub Desktop.

Select an option

Save luisangelma/c6de3cf678d55aeb3051 to your computer and use it in GitHub Desktop.
Player Kills
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body ng-app="myApp" ng-controller="mainController">
<h2>Player Handle</h2>
<div ng-repeat="item in players">
<div ng-repeat="p in item.kills">
<ul>
<li>{{p.rank}}</li>
<li>
<span ng-repeat="clan in p.clan">{{clan}}</span>
</li>
</ul>
</div>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script type="text/javascript">
var app = angular.module('myApp', []);
app.controller('mainController',['$scope' , function($scope){
$scope.players = [{
kills : [
{
handle : "giant90",
rank : 10,
clan: ['KND']
},
{
handle : "Spitfire",
rank : 5,
clan: ['TNT']
}
]
}];
}]);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment