Question · Angular course · Module 8: Forms

setValue vs patchValue

What is the difference between setValue() and patchValue()?

Answer options

  • setValue is faster
  • setValue requires all fields, patchValue updates only the given ones
  • patchValue is for FormArray
  • There is no difference

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