Update app.component.ts to implement OnDestroy interface in Ionic tutorial

This commit is contained in:
juancarmore 2024-06-05 15:58:35 +02:00
parent 75c4fc0172
commit 6a01e3f085

View File

@ -1,5 +1,5 @@
import { HttpClient } from '@angular/common/http';
import { Component, signal } from '@angular/core';
import { Component, OnDestroy, signal } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import {
AlertController,
@ -68,7 +68,7 @@ var LIVEKIT_URL = '';
IonFooter,
],
})
export class AppComponent {
export class AppComponent implements OnDestroy {
roomForm = new FormGroup({
roomName: new FormControl('Test Room', Validators.required),
participantName: new FormControl('Participant' + Math.floor(Math.random() * 100), Validators.required),