-1

I have the following error when I run the ng serve command: error

This is my directory structure: structure

app.component.html: component html

app.component.ts: component ts

app.module.ts: module ts

fondo.service.ts: enter image description here

What I'm doing wrong?

1

2 Answers 2

1

Please Add reference of ReactiveFormsModule in you app,module file or if using standalone then in your component.ts file

@NgModule({
  declarations: [
    AppComponent,
    OrderListComponent,
    OrderDetailComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    ReactiveFormsModule
    
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
Sign up to request clarification or add additional context in comments.

1 Comment

1

Try adding FormsModule and ReactiveFormsModule in your imports.

Visit this link if you still having problems

1 Comment

Thank you for taking the time to answer the question. Your answer is correct and your link to an existing question is awesome. A code sample would make your answer ever better. Please check the answer provided by another user. I will upvote your answer since it's a very good attempt!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.