diff options
Diffstat (limited to 'src/main/webapp/apps/frontPageApp')
-rw-r--r-- | src/main/webapp/apps/frontPageApp/frontPage.html | 24 | ||||
-rw-r--r-- | src/main/webapp/apps/frontPageApp/frontPageApp.js | 12 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/main/webapp/apps/frontPageApp/frontPage.html b/src/main/webapp/apps/frontPageApp/frontPage.html new file mode 100644 index 0000000..bfa2477 --- /dev/null +++ b/src/main/webapp/apps/frontPageApp/frontPage.html @@ -0,0 +1,24 @@ +<div class="container"> + +<div class="page-header"> + <h1>Users</h1> +</div> + +<p> + <table> + <thead> + <th>Name</th> + <th>Level</th> + <th>Count</th> + <th>Progress</th> + <th>Goal</th> + </thead> + <tbody ng-repeat="person in persons"> + <tr> + <td>{{person.name}}</td> + <td>{{person.badges.length}}</td> + </tr> + </table> +</p> + +</div> diff --git a/src/main/webapp/apps/frontPageApp/frontPageApp.js b/src/main/webapp/apps/frontPageApp/frontPageApp.js new file mode 100644 index 0000000..4c5df8b --- /dev/null +++ b/src/main/webapp/apps/frontPageApp/frontPageApp.js @@ -0,0 +1,12 @@ +'use strict'; + +var frontPageApp = angular.module('frontPageApp', ['personService']).config(function ($routeProvider, $locationProvider) { + $routeProvider. + when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.html?noCache=' + noCache}); +}); + +function FrontPageCtrl($scope, $location, PersonService) { + PersonService.query(function (persons) { + $scope.persons = persons; + }); +} |