Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

393
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!