use universal methods to manipulate the HTML element
I'm submitting a ... (check one with "x")
[ ] bug report => check the README and search github for a similar issue or PR before submitting
[ ] support request => check the README and search github for a similar issue or PR before submitting
[X] feature request
Current behavior In @nglibs/meta v0.2.0-rc.5, manipulating the HTML element (to set the lang attribute) has been commented out, in scope of preventing direct DOM manipulation.
Expected/desired behavior We need to set the lang attribute of HTML element, using universal methods as they become available.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Angular version: 2.0.X
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
-
Node (for AoT issues):
node --version=
They did miss that one.. I'm setting it after rendering the HTML for now
I think I know why they missed that one. It is simply not within the scope of title.service and meta.service.
On the other hand, I could develop a method to do it by using the DomAdapter, but as of version 4, we can not access to DomAdapter outside Angular.
Seems like I'll need to develop and integrate it into Angular and make a PR. With the next release of Angular, the v0.4.x can use it (by enforcing that Angular version in peerDependencies) while the v0.2.x can do it internally (accessing the DomAdapter).
https://github.com/angular/angular/issues/15776#issuecomment-291862953