After putting in long hours trying to figure this out on my own, I've finally decided to seek help from the community. Thank you in advance for any assistance!
I have a Web Projects Module that utilizes a Webpage Component. Within the Webprojects Module, I am importing the Objects Module (which includes a Navbar Component and ComponentLoaderDirective).
Now, my challenge lies in loading the contents of navbar.html into webpage.component.html.
I'm encountering errors in Angular that prompt me to re-import NavbarComponent and ComponentLoaderDirective in weboage.components.ts. Without these imports, I receive the following errors: Cannot find the name 'Navbar Component'. Cannot find the name 'ComponentLoaderDirective'.
It seems like there's something missing here, but I'm struggling to identify what it could be.
webprojects.module.ts
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { Global } from '../../../class.global'; //Global Class Contains the Global Variables & Functions Being Used Throughout the Project.
import { StartupService } from 'src/app/services/shared/startup.service'; //StartupService is Used to Get the Project, Page, Object & Elements on Page Load.
import { ObjectsModule } from './objects/objects.module';
import { WebpageComponent } from './webpage/webpage.component'; //WebProjectsModule Uses WebpageComponent as the View (webpage.component.html) & Controller (webpage.component.html).
@NgModule({
declarations: [WebpageComponent], //WebProject Module Uses the Webpage Component
imports: [HttpClientModule, ObjectsModule],
exports: [], //Webprojects Module Exports the Webpage Component to the App Module & Other Modules Using the WebProjects Module
providers: [StartupService, Global] //StartupService, GlobalClass are Required for the WebProjects Module to Work.
})
export class WebProjectsModule {}
webpage.component.ts
//Near identical code as provided above with no alterations.
webpage.component.html
<ng-template pageObjectLoader></ng-template>
<div>Webpage Works!</div>
objects.module.ts
//More or less unchanged content, not altered in any way.
navbar.component.ts
//Exact same code as previously given, no differences made.
navbar.component.html
<mat-toolbar [ngClass]="class">
<span>Yellow Pages & Classifieds | ypandc.com</span>
</mat-toolbar>