Question · Angular course · Module 6: Signals

input.required()

How do you define a required signal input?

Answer options

  • @Input({ required: true }) name = ''
  • name = input.required<string>()
  • name = requiredInput<string>()
  • @RequiredInput() name = ''

You can check the correct answer by solving this task in the CodeWorlds game.