Wednesday, November 2, 2022

angular: template/component renderization failure

 

>PROBLEM


The template/component fails to renderize (it doesn't appear where it should).


>SOLUTION


Considering an example component in the component.html file: 

<my-component></my-component>


Supposing multi-level modules, declare the component in the first level module.


>firts-level.module.ts

import { MyComponentComponent } from './first level path/MyComponentComponent.component';


@NgModule({

  declarations: [

    // ...

    MyComponentComponent,

  ],


NOTE: if the component has parent-child binding, check also its configuration.



>ENV

Angular CLI: 13.2.2

Node: 16.13.1

Package Manager: npm 8.5.4

OS: win32 x64


No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...