diff options
Diffstat (limited to 'src/main/webapp/apps/personApp')
-rw-r--r-- | src/main/webapp/apps/personApp/person.html | 17 | ||||
-rw-r--r-- | src/main/webapp/apps/personApp/personApp.js | 12 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/main/webapp/apps/personApp/person.html b/src/main/webapp/apps/personApp/person.html new file mode 100644 index 0000000..4189f20 --- /dev/null +++ b/src/main/webapp/apps/personApp/person.html @@ -0,0 +1,17 @@ +<div class="container"> + + <div class="page-header"> + <h1>{{person.name}}</h1> + </div> + + <h3>Badges</h3> + <p ng-repeat="badge in person.badges"> + <span class="badge-level-{{badge.level}} badge">{{badge.name}}</span><span ng-show="badge.count > 1"> x {{badge.count}}</span> + </p> + + <h3>Badges in progress</h3> + <p ng-repeat="badge in person.badgesInProgress"> + <span class="badge badge-level-{{badge.level}}">{{badge.name}}</span> progress: {{badge.progress}} of {{badge.goal}} + </p> + +</div> diff --git a/src/main/webapp/apps/personApp/personApp.js b/src/main/webapp/apps/personApp/personApp.js new file mode 100644 index 0000000..59f5a7d --- /dev/null +++ b/src/main/webapp/apps/personApp/personApp.js @@ -0,0 +1,12 @@ +'use strict'; + +var personApp = angular.module('personApp', ['personService']).config(function ($routeProvider, $locationProvider) { + $routeProvider. + when('/', {controller: PersonCtrl, templateUrl: '/apps/personApp/person.html?noCache=' + noCache}); +}); + +function PersonCtrl($scope, $location, PersonService) { + PersonService.get({uuid: uuid}, function (person) { + $scope.person = person; + }); +} |