Pytanie · Kurs Angular · Moduł 2: Komponenty

Wymagany @Input

Jak oznaczyć @Input jako wymagany (required) zgodnie z lekcją?

Odpowiedzi do wyboru

  • @Input({ required: true }) clan!: string;
  • @Input(required) clan: string;
  • @Required @Input() clan: string;
  • @Input() clan: string = required;
Pokaż odpowiedź

Poprawna odpowiedź:

  • @Input({ required: true }) clan!: string;