0

i have a component who has an @Input with alias

export class MyComponent() {
     @Input('my-alias') alias: string
}

And i want get this @Input like that:

<app-mycomponent [my-alias]="'my alias'"></app-mycomponent>

But it's not work. I must configure something?

nicolas
  • 84
  • 1
  • 2
  • Are you importing the Input decorator from the `@angular/core` package? I tested your code and it works for me. – David Fontes May 20 '21 at 12:32
  • Please create an [mcve] to see what you are missing. You can use https://stackblitz.com as well – Igor May 20 '21 at 12:34

0 Answers0