Added router to applications, added application controller

This commit is contained in:
HooVee
2016-08-08 20:40:46 +03:00
parent 118932266f
commit 942d41c41b
3 changed files with 7 additions and 11 deletions
+1 -9
View File
@@ -1,13 +1,5 @@
<h1> Jäsenhakemukset </h1>
<div>
<table id="choose-address-table" class="ui-widget ui-widget-content">
<tbody>
<tr ng-repeat="x in applications">
<th>{{ x.submitted }}</th>
<th>{{ x.member }}</th>
<input type="button" value="More info" class="btn btn-primary" ng-click="show(x.)"/>
</tr>
</tbody>
</table>
</div>
+2 -2
View File
@@ -66,8 +66,8 @@ app.controller("editController", function($scope, $http, $route, $routeParams, $
}
});
/*app.controller("applController", function($scope, $http){
app.controller("applController", function($scope, $http){
$http.get("/members/api/requests").then(function(response){
$scope.applications = response.data;
});
});*/
});
+4
View File
@@ -24,6 +24,10 @@ app.config(['$routeProvider', function($routeProvider){
templateUrl:"/static/html/muokkaa_jasenta.html",
controller:'editController',
})
.when('/applications',{
templateUrl:'/static/html/jasenhakemukset.html',
controller:'applController',
})
.otherwise({
'redirectTo':"/"
})