Here is a snippet from my main.ts
file:
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './components/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
I am currently experiencing an issue with the onSubmit
method in my component as it seems to be firing twice. I have consulted this thread:
https://github.com/angular/angular/issues/9954 but unfortunately, the proposed solution is outdated.
I then came across this discussion: https://github.com/angular/angular/issues/9813
However, none of the suggested fixes seem to work for me. Do you happen to know of any other possible solutions?