The way I ran into the error is to wrap window.openin a timeout. This allows you to open the window after the angular code completes. Usually you do not want to use timeouts inside your application, but since this opens a new window in a new place that will not use the same instance of your application, everything should be in order.
setTimeout(() => {
window.open("./README.md", "_blank");
});
Working plunker
source
share