1 import { Injectable } from '@angular/core';
2 import { HttpClient } from "@angular/common/http";
3 import { Observable, of } from "rxjs";
4 import { Chatroom } from "./chatroom";
9 export class ChatroomService {
11 private uriList = 'http://localhost:8080/list';
13 constructor(private http: HttpClient) { }
15 getChatrooms(): Observable<Chatroom[]> {
16 return this.http.get<Chatroom[]>(this.uriList);