Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Cannot declare 'FormsModule' in an NgModule as it's not a part of the current compilation.

04.02.2023 (πŸ‘4018)


 

Fehlermeldung in Angular Visual Code

"code": "-996001",

"severity": 8,

"message": "Cannot declare 'FormsModule' in an NgModule as it's not a part of the current compilation.",

 

 

Solution:

Place your *Module into the Imports[..] Array

 

App.module.ts

 

import { NgModule } from '@angular/core';

import { BrowserModule } from '@angular/platform-browser';

import { HttpClientModule } from '@angular/common/http';  //*for url to web-api

import { AppRoutingModule } from './app-routing.module';

import { FormsModule } from '@angular/forms';

 

import { AppComponent } from './app.component';

import { ListArticlesComponent } from './components/articles/list-articles/list-articles.component';

import { EditArticleComponent } from './components/articles/edit-article/edit-article.component';

import { ReadArticleComponent } from './components/articles/read-article/read-article.component';

 

@NgModule({

  //*Insert Modules in Import

  imports: [

    BrowserModule,

    AppRoutingModule, //*imports app-routing file

    HttpClientModule,  //for web-api cll

    FormsModule

  ],

 //*Insert Components in Declatation

   declarations: [

    AppComponent,

    ListArticlesComponent,

    EditArticleComponent,

    ReadArticleComponent,    

  ],

 

 

  providers: [],

  bootstrap: [AppComponent]

})

export class AppModule { }

 

 

 

 

Ein Bild, das Text, Screenshot, Monitor, schwarz enthΓ€lt.

Automatisch generierte Beschreibung

 

WRONG

@NgModule({

  //*Insert Modules in Import

  imports: [

    BrowserModule,

    AppRoutingModule, //*imports app-routing file

    HttpClientModule,  //for web-api cll

   

  ],

 //*Insert Components in Declatation

   declarations: [

    AppComponent,

    ListArticlesComponent,

    EditArticleComponent,

    ReadArticleComponent,    

    FormsModule

  ],