logo
down
shadow

Unexpected module 'Ng2SmartTableModule' declared by the module 'AppModule'


Unexpected module 'Ng2SmartTableModule' declared by the module 'AppModule'

By : ErdiaoHan
Date : November 22 2020, 03:01 PM
Does that help Since it is a module, You need to add inside imports not under declarations
code :
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent

  ],
  imports: [
    BrowserModule,
    Ng2SmartTableModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }


Share : facebook icon twitter icon
Uncaught Error: Unexpected module 'FormsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Compo

Uncaught Error: Unexpected module 'FormsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Compo


By : Solomon
Date : March 29 2020, 07:55 AM
Any of those help FormsModule should be added at imports array not declarations array.
imports array is for importing modules such as BrowserModule, FormsModule, HttpModule declarations array is for your Components, Pipes, Directives
code :
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
Unexpected module 'MdAutocompleteModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component an

Unexpected module 'MdAutocompleteModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component an


By : Aditya Mahajan
Date : March 29 2020, 07:55 AM
wish of those help I'm getting this error in my angular 4 project after installing angular material , You are not importing that module
code :
 declarations: [
    AppComponent,
    ////////////////////removed///////////////////////
  ],
  imports: [
    ...MaterialModules, ////////////added here
    BrowserModule,
    FormsModule,
    HttpModule,
    AngularFireModule.initializeApp(environment.firebaseConfig),
    AngularFireDatabaseModule,  // imports firebase/database, only needed for database features
    AngularFireAuthModule, // imports firebase/auth only needed for auth features
    BrowserAnimationsModule,
    CdkTableModule
  ],
Unexpected module 'CdkTableModule' declared by the module 'AppModule'

Unexpected module 'CdkTableModule' declared by the module 'AppModule'


By : T. Richter
Date : March 29 2020, 07:55 AM
will be helpful for those in need CdkTableModule goes in the imports array because it is a module, and not a component.
Unexpected module 'PublicModule' declared by the module 'AppModule'. Angular4 Component Structure

Unexpected module 'PublicModule' declared by the module 'AppModule'. Angular4 Component Structure


By : user1017808
Date : March 29 2020, 07:55 AM
With these it helps Hello here are two solutions for your case:
First is instead using the strategy with in your layout, you can use and in each view where you desire your outlet you wrap the component.
code :
<app-app-layout>
  <h1>
  Html of some component that will be inside viewed inside the layout.
  </h1>
</app-app-layout>
Unexpected module 'BrowserAnimationsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component

Unexpected module 'BrowserAnimationsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component


By : sub1imeMedic
Date : March 29 2020, 07:55 AM
I hope this helps . Move your Modules to your imports Array, declarations are for declaring your components
code :
    imports: [
    BrowserAnimationsModule,
    MatButtonModule,
    MatCheckboxModule
    BrowserModule,
    AlertModule.forRoot(),
  ],
Related Posts Related Posts :
  • Angular 4 Force navigate with refresh
  • Query dom element's properties Angular 4
  • Angular Material Dialog return value
  • Accessing HTTP Error Response Body from HttpInterceptor in Angular
  • Resolve Adal Token for Http Interceptor
  • Is it possible to change namespace name in @nrwl/nx?
  • Angular 4 Router: Getting redirected inside children's first route
  • Uncaught Error: Template parse error There is not such directive with exportAs
  • How can I use @HostListener('window:beforeunload') to call a method?
  • Is it possible to get the type from a generic, given as parameter
  • Ionic 3 - Preventing browser close
  • How to set the color of an icon in Angular Material?
  • how do i handle POST response
  • constructor being called duplicate in *ngFor due to @ViewChild
  • Angular4 OAuth2 IdentityServer4
  • ERROR TypeError: Cannot read property 'name' of undefined
  • Angular4 http get with URL parameter
  • What is the difference between fakeAsync's tick() and done() in angular2 testing?
  • How to push in service without losing previous data?
  • How to make custom arrow mark in agm-map?
  • Upload File in Angular 4 using FormData works in Local but not on Azure App Service
  • How to automatically deploy a Laravel app with embedded Angular to Heroku
  • use angular-cli project with visual studio asp.net empty web app?
  • How to load different templates for the same component?
  • Creating Angular4 'Loading' Screen: ExpressionChangedAfterItHasBeenCheckedError
  • How to pass a array value as color in Angular 4
  • Coerce the HttpResponse into an item of the specified type, complete with custom methods
  • Angular/rxjs: Why don't I have to import toPromise anymore?
  • Angular 2 @Input not works for router outlet
  • Nested Model - Angular 2
  • Supress duplicate error in aot compiler
  • Angular2 ExpressionChangedAfterItHasBeenCheckedError
  • Consuming my promise inside my Angular component
  • Despite error cannot read property length of null, the code works
  • Accessing data returned by Promise.all
  • How to add background image with ngStyle?
  • Property X doesn't exist on type Y[]
  • Ionic Headers Failing to set through http.post
  • Angular 4 routing/state problems
  • Angular 2 Dashboard application web api call at initialization
  • ngrx/store:subscribe works fine but async in template gives [object Object]
  • Angular2 - how to mix custom and declared arguments in constructor
  • Implementing Geolocation from @ionic-native/geolocation
  • Angular - Test library before publish
  • AoT Compilation Failed - no such file or directory, lstat 'tsconfig-aot.json'
  • Docker container from Angular4 app : "-p" : executable file not found in $PATH
  • Invalid container name
  • Angular - NgStyle fall back image
  • Angular Observable not updating when I subscribe.
  • Angular mat-checkbox getElementById
  • Angular 4 Injecting route in the APP_INITIALIZER
  • Error: EACCES: Error: EACCES: permission denied, open '/Users/emilio/.ionic/daemon.log' at Error (native)
  • selected value in dropdown list does not work Angular
  • how to smooth scroll down to element on page load angular 4?
  • AngularFire update breaks the app
  • experimentalDecorators Warning on ts lint
  • Dexie - Check if a record exists and initialize it if not present
  • How should I use BehaviorSubject class from a Service in the HTML Template of a Component in Angular 4?
  • How to make ngx-bootstrap datepicker be able to select and display only month and year?
  • What is wrong with this Angular form that makes it reset selected values in the UI unexpectedly?
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org