Tried to bind to a property that is not marked as @Input: vm from base class
See original GitHub issueI have an abstract base class that includes an @input property, when I extend that base class I use that input in many places in the extended class.
The issue I’m having is that, when testing it on binding that property I get the following error:
Error: Tried to bind to a property that is not marked as @Input: vm
Here’s an example on what would be the scenario:
export abstract class BaseClass{
@Input() public vm: MyProperty;
}
export class MyComponent extends BaseClass{
//code here
}
now, if I try to initialise my test in the following way:
beforeEach(async () => {
shallow = new Shallow(MyComponent, MyModule);
const { instance } = await shallow.declare().render({ bind: { vm: myMockValue } });
});
this will break when I run it as it won’t identify the vm property as an input, which is, but it’s declared in the base class, not in the child class (the one I’m testing).
Is this a bug or am I supposed to test in a different way when the @input is declared in the base class?
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Angular 4 Can't bind to <property> since it isn't a known ...
But, I got this error when bind the property of class into component template. Console error: Unhandled Promise rejection: Template parse errors: Can't...
Read more >Solved: New-VM - Not accepting a variable as input
The object type of $strBestHost is wrong. This is caused by Select, as it creates a new object and copies the properties you...
Read more >A Better Way to Implement Data Binding in .NET
One way to simplify the situation is with a base class, in order to reuse some of the boilerplate logic. This also provides...
Read more >Binding to a property which is not in baseclass in UI for WPF
This is true, the DbBaseObject doesn't have a property "Name" but this shouldn't be a reason not to show a column. Is there...
Read more >Throwable
AndroidException, Base class for all checked exceptions thrown by the ... thrown when an attempt is made to connect a SocketChannel for which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@antch I just backported this to 13.0.2!
Sorry about that, was unintentional. I can try looking into this later today.