Hey there! I'm encountering an issue with Angular modularity that's got me scratching my head. Here's the problem:
ERROR in src/app/components/common/dialog/confirm-dialog/confirm-dialog.component.html:1:1 - error NG8001: 'td-dialog' is not a known element:
1. If 'td-dialog' is an Angular component, then verify that it is part of this module.
2. If 'td-dialog' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
I'm puzzled as to why 'td-dialog' is not recognized as a known element, especially since I have imported a module that includes the td-dialog selector (Teradata Covalent CovalentDialogsModule
). Below are code samples from the two modules: the one where the error occurs and the root module.
// Module with 'td-dialog' unknown element error
import { NgModule } from '@angular/core';
import { ConfirmDialogComponent } from './dialog/confirm-dialog/confirm-dialog.component';
import {commonModules} from '../../app.module';
@NgModule({
declarations: [
ConfirmDialogComponent
],
imports: [
commonModules
],
exports: []
})
export class CommonComponentsModule { }
// Root module
import {NgModule} from '@angular/core';
import {RootComponent} from './components/root.component';
// etc. (list too long to fully transcribe)
// Unfortunately reaching character limit to continue transcription
Seems like I've tried everything, including checking imports and adding CUSTOM_ELEMENTS_SCHEMA, but no luck so far. Will keep searching for a solution!