Question · Angular course · Module 6: Signals

Reading a signal's value

Why does reading a signal's value require parentheses, e.g. count()?

Answer options

  • Because a signal is an ordinary variable stored in memory
  • Because a signal is a function - calling it registers a dependency and returns the current value
  • Because the parentheses trigger an asynchronous fetch of the value from the server
  • Because without parentheses Angular throws a TypeScript compilation error

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