Skip to content
Snippets Groups Projects
Commit 6af75afb authored by Tom Käsler's avatar Tom Käsler
Browse files

Focus roomId input on init

parent d21a235e
No related merge requests found
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { Room } from '../../../models/room';
import { RoomService } from '../../../services/http/room.service';
import { Router } from '@angular/router';
......@@ -24,6 +24,7 @@ export class JoinErrorStateMatcher implements ErrorStateMatcher {
styleUrls: ['./room-join.component.scss']
})
export class RoomJoinComponent implements OnInit {
@ViewChild('roomId') roomIdElement: ElementRef;
room: Room;
demoId = '95680586';
......@@ -41,6 +42,7 @@ export class RoomJoinComponent implements OnInit {
}
ngOnInit() {
this.roomIdElement.nativeElement.focus();
this.authenticationService.watchUser.subscribe(newUser => this.user = newUser);
}
......
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