Launch.json文件的建立和生成咱們能夠利用VS Code自動化生成。html
Chrome配置:web
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}
]
}
Firefox配置:chrome
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Firefox localhost",
"type": "firefox",
"request": "launch",
"reAttach": true,
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}
]
}
ng serve
最後祝你享受你的Angular之旅~json
轉載請註明出處:http://www.javashuo.com/article/p-dmzvkuis-hd.htmlurl