0

I want to try out a signal based component as described here: https://github.com/angular/angular/discussions/49682

I get an error when trying to use signals: true in the component decorator. The error says it is not a know property. I am using the latest version of Angular 16.2.0. Is there something I need to change in my angular.json or something like that to enable this feature?

here is my component decorator:

@Component({
  signals: true,
  standalone: true,
  selector: 'app-counter',
  imports:[CommonModule],
  template: ` <!-- count is invoked as a getter! -->
    <p>Count {{ count() }}</p>
    <p>{{ name }}</p>
    <!-- Not reactive! -->
    <button (click)="increment()">Increment count</button>`,
})
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
Lotus_8
  • 159
  • 2
  • 11

1 Answers1

3

Signal based component aren't available/implemented yet and it is expected that they will land after 17.0.

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134