Get mates on page load
This commit is contained in:
parent
3fcbf6124f
commit
ac6d8614dc
@ -4,6 +4,12 @@ app.controller("mates", ["$scope", "$http", function($scope, $http)
|
|||||||
{
|
{
|
||||||
$scope.mates = 0;
|
$scope.mates = 0;
|
||||||
|
|
||||||
|
$http.get("/mates")
|
||||||
|
.then((r) =>
|
||||||
|
{
|
||||||
|
$scope.mates = angular.fromJson(r.data).mates;
|
||||||
|
});
|
||||||
|
|
||||||
$scope.countClick = () =>
|
$scope.countClick = () =>
|
||||||
{
|
{
|
||||||
$http.post("/mates")
|
$http.post("/mates")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user