Reputation: 103
I want to display html content for users who don't use javascript in my Angular app, how can I do it?
Using the noscript tag in the index.html file doesn't work
<body>
<noscript>Test</noscript>
<app-root></app-root>
</body>
Upvotes: 1
Views: 179
Reputation: 56600
I just checked in my local system, the noscript
tag works great, please try restarting the server once, it will start working.
next to refresh button on browser press the button next to url, then click on site settings and new tab will open, there disable javascript!
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
<noscript>Please enable javascript!</noscript>
</body>
</html>
Upvotes: 1