I need to communicate a child window with parent window in Angular 2 I'm clueless, how to I can use window.opener to pass a parameter to angular 2.
In angular 1.5 I used something like this Accessing parent
In Javascript something like this
Parent Window
<!DOCTYPE html>
<html>
<body>
<h1 id="demo">parent</h1>
<script>
function parentFunction(myVar) {
document.getElementById("demo").innerHTML = myVar;
}
</script>
</body>
</html>
Child window
<!DOCTYPE HTML>
<html>
<head>
<title>fuente de múltiples elementos</title>
</head>
<body>
<button onclick="window.opener.homeFunction('passVariable')">Click me</button>
</body>
</html>