In an Angular app Webstorm doesn't recognize annotations (like @Input and @Output) of the parent class

I have a parent class like this: 

@Component({
selector: 'app-parent',
})
export class ParentComponent {
@Input() test;
}

... and a child class like this:

@Component({
selector: 'app-child'
})
export class ChildComponent extends ParentComponent {}

Now when I want to assign the inputs in a template like this...

<app-child [test]="data"></app-child>

... the [test] is marked as an error with the message "Property test is not provided by any applicable directives nor by app-child element".

That should work or am I wrong?

3 comments
Comment actions Permalink

Can't reproduce:

 

 

 

Is parent component defined in the same app, or in a library? Please see https://youtrack.jetbrains.com/issue/WEB-40709 - does it look similar?

0
Comment actions Permalink

Yes, you're right, I missed to mention that the parent class is in a library which is imported via npm. The parent class isn't an abstract class though, so I'm not sure if it's the same issue like the one you linked?

0
Comment actions Permalink

Yes, it's the same issue

0

Please sign in to leave a comment.