Skip to content
Snippets Groups Projects
Commit 6b8e9fd1 authored by David Noah Donges's avatar David Noah Donges
Browse files

Format code

parent ce5b6b6e
No related merge requests found
import { Component, OnInit } from '@angular/core';
import { Room } from '../room';
import { RoomService } from '../room.service';
import { Router } from '@angular/router';
@Component({
selector: 'app-room-list',
......@@ -9,14 +8,10 @@ import { Router } from '@angular/router';
styleUrls: ['./room-list.component.scss']
})
export class RoomListComponent implements OnInit {
rooms: Room[];
closedRooms: Room[];
constructor(
private roomService: RoomService
) {
constructor(private roomService: RoomService) {
}
ngOnInit() {
......@@ -24,14 +19,9 @@ export class RoomListComponent implements OnInit {
}
getRooms(): void {
this.roomService.getRooms().subscribe(rooms => {
this.rooms = rooms;
this.closedRooms = this.rooms.filter(room => room.closed);
});
}
}
......@@ -9,7 +9,6 @@ const httpOptions = {
@Injectable()
export class RoomService {
private roomsUrl = 'api/rooms';
constructor(private http: HttpClient) {
......
......@@ -9,7 +9,6 @@ import { ActivatedRoute } from '@angular/router';
styleUrls: ['./room.component.scss']
})
export class RoomComponent implements OnInit {
room: Room = null;
constructor(private roomService: RoomService,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment