Home > Blockchain >  Angular error: Can't bind to 'x property' since it isn't a known property of �
Angular error: Can't bind to 'x property' since it isn't a known property of �

Time:07-22

I have used an @Input decorator in a component to receive data from another component.

childComponent.ts- @Input() isShown: boolean;

parentComponent.html- <tab [isShown]="form.get('tab').value === View.Account" [label]="Tab Name" ></tab>

I am getting this error on compilation-- error: Can't bind to 'isShown' since it isn't a known property of 'tab'

What can I do to fix this?

CodePudding user response:

Looking at the above comments and see that "tab" selector being a selector for a custom library, not your child component, it doesn't make any sense of having an @Input on your child, but you use it to another component. The isShown should be used with the child selector.

  • Related