Hide this button when the editor is already collaborative. Change the click handler to ask the server for a new room id and redirects the user to that route.
Hide this button when the editor is already collaborative. Change the click handler to ask the server for a new room id and redirects the user to that route.
clement.freville2 marked this conversation as resolved
(click)="onRunButtonClicked()"
[disabled]="isLoaded">
Créer une salle
</button>
Hide this button when the editor is already collaborative. Change the click handler to ask the server for a new room id and redirects the user to that route.
color: white;
padding: 12px 16px;
font-size: 16px;
width: 100px;
async onCreateRoomButtonClicked() {
const idRoom = await this.backendService.createRoom();
this.router.navigate([`./editor-live/${idRoom}`]);
constructor() {}
async createRoom() {
const reponse = await fetch(this.apiUrl + '/live');
Great work!
7dfd83b60a
into master 11 months agoReviewers
7dfd83b60a
.