Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

395
Vistas
angular 12 Universal, fail html validation with error on app selector

Any ideas what to do, whit this error?

The simple test as angular v12, Universal SSR fail the W3 HTML validation.

the AppComponent have a selector like:

@Component({
selector: 'app',
templateUrl: './app.component.html',
encapsulation: ViewEncapsulation.None
})

and on index

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <app id="app"></app>
</body>
</html>

But W3 HTML validation shows an error:

enter image description here

I also try to change the selector name to like: 'project' and I got the same error

enter image description here

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Edit : use a name with a hyphen, like app-root

Strangely, the validator won't complain about app root or other angular directive tags, but it will complain about all _ngcontent-** attributes.

Note that there is a message filtering function in the w3c validator so you can ignore specific warnings (such as the _ ngcontent-** attribute) (message from w3c maintainer here )

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda