'signals' does not exist in type 'Component'

55 Views Asked by At

I'm trying to use Angular Signal Based Components feature. Just seen this on Angular Signal Based Components. How do I use signals: true property in component decorator? with v17 release and see the many articles (https://www.techiediaries.com/signal-based-components-in-angular-17/#:~:text=Signal%2Dbased%20components%20are%20a%20powerful%20new%20feature%20in%20Angular,benefits%20in%20your%20own%20applications as example) but never seen on official documentation.

However I've updated @angular/core and @angular/cli to the latest versions (respectively 17.2.4 and 17.2.3) but I'm struggling with this compiling error:

'signals' does not exist in type 'Component'

here's my implementation:

import { Component } from '@angular/core';
...

@Component({
  standalone: true,
  signals: true,
  selector: 'app-my-component',
  templateUrl: './my-component.component.html',
  styleUrls: ['./my-component.component.css'],
  imports: [
    ...
  ]
})
export default class MyComponent { ... }

enter image description here

So, there's my mistake somewhere or it's just early to use Signal Based Components?

0

There are 0 best solutions below