Bas Bas - 6 months ago 43
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="" />


You can try the following way:

let ogTitleMeta = document.querySelector('meta[property="og:title"]'); 
ogTitleMeta.content = 'change content here!';