One specific component of my application doesn't bind any input I pass.
My component
@Component({
selector : 'default-actions',
templateUrl : './default.actions.template.html',
styleUrls: [ './default.actions.style.scss' ],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DefaultActionsComponent
{
protected entityId;
protected uuid = UUID.UUID();
protected extraForms;
@Input() protected data;
@Input() protected structure;
@Input() protected targetId;
@Input() protected table;
@Input() protected row;
@Input() protected modal: ModalDirective;
@Input() protected entity;
@Input() protected entityObject: Entity;
@Input() protected parentWrapper;
@Input() protected foo;
constructor(
protected translate: TranslateService,
protected activatedRoute: ActivatedRoute,
protected actionService: DefaultActionsService,
protected router: Router,
protected entityService: EntityService,
protected http: HttpAuthenticationService
) {}
public ngOnInit() {
console.log(this.foo);
}
I use it here:
<default-actions
[table]="table['defaultListingTableComponent']"
[row]="row"
[foo]="'bar'"
[modal]="modal"
[structure]="availableColumns"
[entityObject]="entityObject"
[targetId]="selectedRows()">
</default-actions>
I added foo input in order to do some debugging. In console the line console.log(this.foo); outputs undefined. The same happens to all other inputs.
I believe there's something wrong with the component itself, however I'm unable to find it. Other components of my application are working.
protected?DefaultActionsComponentitself.