Get mates on page load

This commit is contained in:
Thomas Wade 2018-10-06 04:18:55 +09:30
parent 3fcbf6124f
commit ac6d8614dc

View File

@ -4,6 +4,12 @@ app.controller("mates", ["$scope", "$http", function($scope, $http)
{
$scope.mates = 0;
$http.get("/mates")
.then((r) =>
{
$scope.mates = angular.fromJson(r.data).mates;
});
$scope.countClick = () =>
{
$http.post("/mates")