akveo / akveo/ng2-smart-table

Ng2-smart-table custom Render component

Abierto
#533 20 comentarios 9 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
1.6k
Forks
867
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Im trying to use a custom Renderer component in my ng2-smart-table but am getting the following error.

No component factory found for undefined. Did you add it to @NgModule.entryComponents?
at…, …}
Whats Strange is that the component says its undefined.

My component looks like this.

import { Component, OnInit, Input } from '@angular/core';
import { ChannelTableModeService } from '../../../../../../services/channel-table-mode.service';
import { ViewCell } from 'ng2-smart-table';

@Component({
selector: 'app-channel-attribute-renderer',
template: '{{renderValue}} --'
})
export class ChannelAttributeRendererComponent implements OnInit {

constructor() { }
renderValue: string;
@Input() value: string | number;
@Input() rowData: any;
ngOnInit() {
this.renderValue = '<' + this.value + '>';
}

}

I've also made sure that the component is in the module.

@NgModule({
imports: [
Ng2SmartTableModule,
CommonModule,
ChannelProfileRoutingModule,
VeexCommonModule,
TranslateModule,
FormsModule
],
entryComponents: [ChannelAttributeRendererComponent, PasswordRenderComponent],
providers: [ChannelTableModeService],
declarations: [ PasswordRenderComponent, ChannelProfileComponent, ChannelTableComponent, ServiceTypeComponent, ServiceGroupComponent, ChannelPlanEditorComponent, ChannelAttributeRendererComponent]
})

export class ChannelProfileModule { }

So does anyone see the issue. Why does he factory think that the component is undefined.

The configuration form my smart table looks like this:

this.settings = {
columns: {
'Channel': {title: 'Channel'},
'Channel Label': {title: 'Channel Name'},
'Video': {title: 'Video', type: 'custom', renderComponent:
PasswordRenderComponent}
}}

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.