2
votes
  ERROR in : 'app-admin-navs' is not a known element:

1. If 'app-admin-navs' is an Angular component, then verify that it is part of this module. 2. If 'app-admin-navs' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->] ")

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import {AuthenticationModule} from './authentication/authentication.module';
import { SelectModule } from 'ng-select';
import {FormsModule} from '@angular/forms';
import { RouterModule } from '@angular/router';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
// import { SharedModule } from './shared/shared.module';

// import {ProcessListService} from '././processflow/services/process-list.service';



import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { ReactiveFormsModule } from '@angular/forms';


@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    RouterModule,
    AppRoutingModule,
    FormsModule,
    ReactiveFormsModule,
    SelectModule, // Select2
    NgbModule.forRoot(), // bootstrap
    AuthenticationModule,
    NoopAnimationsModule,

    // lazy load other modules. they are in shared module, lazy loaded by routes


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





  <app-admin-navs></app-admin-navs>
    <router-outlet></router-outlet>

     @Component({
  selector: 'app-admin-navs',
  templateUrl: './admin-navs.component.html',
  styleUrls: ['./admin-navs.component.css']
   })
1
post your app.module.tsSajeetharan
@Sajeetharan , i have .Bakare Isaac Omotayo
Include in the question the declaration of the component (including the selector statement in the @Component section), and the markup where you include the component.ConnorsFan
@ConnorsFan i have edited the questionBakare Isaac Omotayo

1 Answers

3
votes

As the error says you need to add the component inside the app.module.ts, I assume the name as AppAdminNavigationComponent

@NgModule({
  declarations: [
    AppComponent,
    AppAdminNavigationComponent
]