#Button not working

35 messages · Page 1 of 1 (latest)

dawn slate
#

I have a quick Question about a submit button in my form. If i press it there wont be the onSubmit() method called. Did I miss something? This is the tutorial i used: https://www.techiediaries.com/login-signup-api-angular-17/

silk hemlock
#

By looking at your template, you should worry about red underlined code: it means there is something wrong.

dawn slate
#

Idk what i did wrong but in theory the Methode should be called.

silk hemlock
dawn slate
silk hemlock
dawn slate
#

oh

#

it say only "remove Attribute"

#

but i think its normal

silk hemlock
dawn slate
#

All Angular related attributes are underlined

#

but the rest work

silk hemlock
dawn slate
#

This is an example out of another project

#

It worked

silk hemlock
dawn slate
#

i sent the wrong form 🤦‍♂️ mb

#

But its the same message here

silk hemlock
#

Show the html file anyways

#

I confess I don't understand why it does not work. Any error in devtools console?

dawn slate
#

there are no errors. If i press the button my browser thinks im logging in and wants to save the logindata. But in the onSubmit() gets never called

#

do i have to put the form inside of a ngonInit() function?

dawn slate
#

I need still help 🙂 What could i do to debug better. Is the validation incorrect?

silk hemlock
vital minnow
#

@dawn slate What if you say <button type="submit">Submit</button>

dawn slate
#

Only difference is that my signup component gets loaded by the router outlet as a new page

silk hemlock
#

Given that's a short tutorial, i'd encourage you to create a brand new project to test it once again.

dawn slate
#

This project was a clean start

#

I just wanted to test a Login Form

silk hemlock