setTimeout

  1. Komponens (.ts): Ehhez először módosítanod kell az onSubmit metódust, hogy egy setTimeout-ot alkalmazzon, amikor a visszajelzési üzenetet beállítja.
   ...
   .then(() => {
       console.log('Movie updated successfully in Firestore');
       this.feedbackMessage = 'Movie updated successfully in Firestore';
       this.feedbackType = 'success';
       this.finished.emit();

       // Set timeout to hide the feedback message
       setTimeout(() => {
           this.feedbackMessage = null;
       }, 3000);  // 3 seconds
   })
   ...
Was this page helpful?