13 lines
349 B
TypeScript
13 lines
349 B
TypeScript
|
import { Injectable } from '@angular/core';
|
||
|
import { HttpClient } from '@angular/common/http';
|
||
|
|
||
|
@Injectable({ providedIn: 'root' })
|
||
|
export class JumpService {
|
||
|
private apiUrl = 'http://localhost:8080/game/jump';
|
||
|
|
||
|
constructor(private http: HttpClient) {}
|
||
|
|
||
|
registerJump() {
|
||
|
return this.http.get<{ totalJumps: number }>(this.apiUrl, {});
|
||
|
}
|
||
|
}
|