我按照下面提到的链接设置本地环境并启动应用程序。
https://angular.io/docs/ts/latest/guide/setup.html
当我使用 npm start 命令启动应用程序时,它会引发错误。在指南中提到 npm start 不起作用
'npm start 在 Bash for Windows 中失败,它不支持从 2017 年 1 月起与服务器联网。
那么您能否让我知道如何启动 Angular 应用程序。
我按照下面提到的链接设置本地环境并启动应用程序。
https://angular.io/docs/ts/latest/guide/setup.html
当我使用 npm start 命令启动应用程序时,它会引发错误。在指南中提到 npm start 不起作用
'npm start 在 Bash for Windows 中失败,它不支持从 2017 年 1 月起与服务器联网。
那么您能否让我知道如何启动 Angular 应用程序。
在控制台中运行它......而不是在“Bash for windows”中。
我使用 npm start 成功运行了我的 Angular 应用程序。
您使用的是哪个 IDE。我使用 VS Code,你有集成的终端控制台。运行npm start它应该运行您的应用程序。您还可以在 package.json 所在的项目文件夹中使用命令提示符,通过运行 cmd 来启动您的应用程序npm start。
另一种解决方案是使用 angular-cli,我认为这是开始一个新的 Angular 项目的最佳方式。这是官方文档中的链接。在 angular-cli 中创建新项目就这么简单
ng new app-name