Set the title of angular application from the parent tab in chrome


I have an application which opens another angular application in a new tab on clicking a button. I need to override the title of the new tab from the parent tab and set a value. Some mock code below

<!DOCTYPE html>

    <title>New tab</title>

        <input id="toolId" placeholder="ToolId" style="padding: 4px 0; width: 70px;" />

        <button id="button">Launch</button>

        window.onload = function () {
            document.getElementById('button').addEventListener('click', () => {

                var newWin ='http://localhost:4200', "_blank");

                // add a load listener to the window so that the title gets changed on page load
                newWin.onload = function() {
                    newWin.document.title = 'New Title';

                // newWin.document.title = 'New Title';


But when i try to do this , i always see the default value set by the angular application rather than what is set by the above code. What am i missing here ? Is it blocked by chrome by chance, could not find any relavent doc if it is .

Source: Angular Questions

Categorized as angular, javascript, tabs Tagged , ,


you can check this documentation

Verda Schaden

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us