From the course: Reactivity and Signals in Angular
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Introducing signals - Angular Tutorial
From the course: Reactivity and Signals in Angular
Introducing signals
- If you haven't used the Angular Signals API as a developer, there's a very good chance that you have used it as a consumer. When the Angular team created the Signals API, they worked closely with the Wiz team at Google to create a package that could be shared across the Google stack. Angular Signals are used in production for YouTube, Gmail, Google Photos, and more. In fact, the Angular Signals API is the basis for the TC39 proposal to add Signals as a primitive to JavaScript itself. Let's take a closer look at the API. Like most APIs, there are public methods that we can interact with as developers, plus under-the-hood functionality. The public API of Angular Signals is pretty straightforward. There are different types of signals, all of which are instantiated using a factory function. Every signal can be read by invoking its getter method, but only writable signals have setter methods. Developers can directly change the value of a writable signal after instantiation by calling…