Ionic 5 capacitor app.
I have a button in a child component that when clicked, emits an event that calls a function in the parent component. In other words…
Child component’s .ts
@Output() formSubmitted = new EventEmitter<any>();
//... other stuff
submitCredentials(authForm: FormGroup): void {
if (!authForm.valid) {
console.log('Form is not valid yet, current value:', authForm.value); }
else{
const credentials = {
email: authForm.value.email,
password: authForm.value.password};
this.formSubmitted.emit(credentials); }
}
Parent component’s html
<app-auth-form
(formSubmitted)="handleUserCredentials($event)">
</app-auth-form>
This works fine on the web and on Android. On iOS simulator & device, it works with livereload, but without livereload, it does nothing.
Any idea why this is the case? How do I resolve it to work without livereload?
3 posts - 2 participants