Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Property 'submit' does not exist on type 'SingupComponent'

I’m starting my studies with Angular and I don’t understand how to solve this:

Compiled with problems:X

ERROR

src/app/singup/singup.component.html:14:50 - error TS2339: Property 'submit' does not exist on type 'SingupComponent'.

14       <form [formGroup]="singUpForm" (ngSubmit)="submit()">
                                                    ~~~~~~

  src/app/singup/singup.component.ts:21:16
    21   templateUrl: './singup.component.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component SingupComponent.

enter image description here

If anyone knows how to solve it and can share…

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

This errors means that you didn’t create the method in your component class. Make sure you have, and that your file are saved (screenshot shows unsaved file)

@Component({...})
export class SignupComponent {
    ...

    submit() {}

    ...
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading