cf7c36d77f7377b929fcac9970e678bdf9e983ab
[angular-mojolicious.git] / public / app / drzb2011 / registrations.html
1 <!DOCTYPE HTML>
2 <html xmlns:ng="http://angularjs.org">
3 <head>
4 <meta charset="utf-8">
5 <script src="angular.js" ng:autobind></script>
6
7 <script>
8 Registrations.$inject = ['$xhr']; 
9
10 function Registrations(xhr){ 
11         this.xhr = xhr; 
12         var self = this;
13         this.xhr("JSON"
14                 , "/data/drzb2011/Registration?callback=JSON_CALLBACK"
15                 , function(code, response){ 
16                         console.log('xhr JSON', code, response);
17                         self.data = response;
18                 }
19         ); 
20
21
22
23 </script>
24
25 <title>DRZB2011 Registrations</title>
26
27 <style>
28 .address {
29         font-size: 80%;
30 }
31 </style>
32
33 </head>
34 <body>
35
36 <div ng:controller="Registrations"> 
37
38 <ul>
39 <li ng:repeat="registration in data">
40 {{registration.person.name}}
41 {{registration.person.surname}}
42 &lt;{{registration.person.email}}&gt;
43 <div class=address>{{registration.person.inst}}</div>
44 <div class=address>{{registration.person.zip}} {{registration.person.city}}</div>
45 </li>
46 </ul>
47
48 <input name=debug type=checkbox>
49 <pre ng:show="debug">
50 data={{data}}
51 </pre>
52
53 </div>
54
55
56 </body>
57 </html>