1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Input based signal check gives not a function error

Discussão em 'Angular' iniciado por Sunstrike527, Maio 26, 2025.

  1. Sunstrike527

    Sunstrike527 Guest

    I have an input signal which I take and set as attribute but in browser I see an error


    this.width is not a function
    ​

    export class SkeletonComponent implements OnInit {
    readonly width = input<string>('');

    ngOnInit(): void {
    if (isPlatformServer(this.platformId)) {
    return;
    }

    const host = this.host.nativeElement;
    host.style.setProperty('--app-skeleton-width', this.width() || '100%');

    Continue reading...

Compartilhe esta Página