Skip to content

Inputs() are not discovered if part of a common directive after upgrade from Angular 13 to Angular 18 #518

Answered by gund
Ghevi asked this question in Q&A
Discussion options

You must be logged in to vote

Well as I already explained, you cannot inherit inputs or anything really by extending interfaces with the same name and think that Angular will magically pickup those inputs somehow like you are doing here.
Interfaces have nothing to do with classes even when have the same name, you are just adding extra type information but nothing in the runtime is affected and Angular also does not care what you do with interfaces.
Like I already said above, your component class MUST extend another component/directive class not interfaces to inherit it's inputs and all the rest of the behaviors. You may refer to the example I provided to see how it looks like but the way you've built your "inheritance…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@gund
Comment options

gund Nov 15, 2024
Maintainer

@gund
Comment options

gund Nov 15, 2024
Maintainer

@Ghevi
Comment options

@gund
Comment options

gund Nov 18, 2024
Maintainer

Answer selected by Ghevi
@Ghevi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants