Duplicate <html> tag in markup for angular #1445

Closed
opened 2025-08-09 17:20:10 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @andreymir on 8/9/2016

For angular template, with server-side rendering enabled the resulting markup is invalid. It contains duplicate <html> and <body> tags.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Home Page - TestAngular</title>
        <base href="/" />
        <link rel="stylesheet" href="/dist/vendor.css" />
        <link rel="stylesheet" href="/dist/styles.css" />
    </head>
    <body>
<app><!DOCTYPE html><html><head><title></title></head><body><app><h1>My First Angular 2 App</h1></app></body></html></app>
<script src="/dist/vendor.js?v=ST5Wa4e5mzPX7ta66f3OtVqEjo2qferfDltnP-noHNg"></script>
<script src="/dist/main.js?v=xXJhvd8rq7SFv-t1CDTZ0d9PUS2-IRftQ4NTA_R9aqc"></script>
</body>
</html>
*Originally created by @andreymir on 8/9/2016* For angular template, with server-side rendering enabled the resulting markup is invalid. It contains duplicate `<html>` and `<body>` tags. ``` html <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Home Page - TestAngular</title> <base href="/" /> <link rel="stylesheet" href="/dist/vendor.css" /> <link rel="stylesheet" href="/dist/styles.css" /> </head> <body> <app><!DOCTYPE html><html><head><title></title></head><body><app><h1>My First Angular 2 App</h1></app></body></html></app> <script src="/dist/vendor.js?v=ST5Wa4e5mzPX7ta66f3OtVqEjo2qferfDltnP-noHNg"></script> <script src="/dist/main.js?v=xXJhvd8rq7SFv-t1CDTZ0d9PUS2-IRftQ4NTA_R9aqc"></script> </body> </html> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1445
No description provided.