Home > other >  How can I make ng serve open in Microsoft Edge?
How can I make ng serve open in Microsoft Edge?

Time:06-04

I'd like to be able to serve my application to Edge but by default it opens in Chrome. This is what I see in .vscode/launch.json:

{
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "ng serve",
      "type": "pwa-chrome",
      "request": "launch",
      "preLaunchTask": "npm: start",
      "url": "http://localhost:4200/"
    },
    {
      "name": "ng test",
      "type": "chrome",
      "request": "launch",
      "preLaunchTask": "npm: test",
      "url": "http://localhost:9876/debug.html"
    }
  ]
}

CodePudding user response:

This .vscode/launch.json file is only used for the debugging mood, so to make ng serve --open open with Microsoft Edge, you should change the default browser for your system to Microsoft Edge instead of Chrome

CodePudding user response:

  1. Download / install this edge plugin: enter image description here

  2. Right-click the plugin icon then select this option enter image description here

No more errors in console, page loads successfully!!! enter image description here

  • Related