Bas Bas - 1 year ago 125
TypeScript Question

Angular 2 / typescript binding text to <meta property="og"> from component to index.html

How can I bind a variable of a component to the index.html
I want pass/bind a var from a component to the index.html specific i want to change the

<meta property="og:title" content="" />

Answer Source

You can try the following way:

let ogTitleMeta = document.querySelector('meta[property="og:title"]'); 
ogTitleMeta.content = 'change content here!';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download