How to enable "css" or"scss" intelligence in angular typescript file?

Discussão em 'Angular' iniciado por 3gwebtrain, Junho 29, 2025.

  1. 3gwebtrain

    3gwebtrain Guest

    How to enable css auto intelligence with typescript inline styles in angular with Visual studio code?

    here is my code:

    import { Component } from "@angular/core";
    import { RouterLink } from "@angular/router";

    @Component({
    selector: "app-header",
    imports: [RouterLink],
    template: ` <h1><a [routerLink]="['/']">Connect</a></h1> `,
    styles: `
    h1 {
    display: inline-block;
    }
    h1 a {
    cursor: pointer;
    padding: 1rem 2.5rem;
    display: block;
    background: url("../../../assets/connect-desktop-header-bi.svg") 0 center no-repeat;
    text-indent: -9999px;
    overflow: hidden;

    }
    `,
    })
    export class Header {}


    While I type, I am not getting "auto complete" with css section. it works fine with css files.

    [​IMG]

    Continue reading...

Compartilhe esta Página