This is pretty much an update of AngularJS dynamic lang attribute of html for Angular >= 2.
My application is localized in three languages which the user can change dynamically, without page refresh. I need to set the index.html language attribute accordingly.
<html lang="en">
<head>
<meta charset="utf-8">
<title>My application</title>
<base href="/">
</head>
<body>
<app-root></app-root>
</body>
</html>
I need help only on changing the tag attribute, the application is already localized and supports language change.