问题:
ng : 无法加载文件 C:\Users\taowenqian\AppData\Roaming\npm\ng.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。

解决:
1.一.我们在win10 系统中有一个搜索框 输入 Windos PowerShell
noted: 一定要选择 管理员身份运行

二.打开了命令行之后,输入
set-ExecutionPolicy RemoteSigned
然后更改权限为A(如果不小心选错了其他选项,请输入下面的命令即可重新选择)
Set-ExecutionPolicy Unrestricted

三、跑项目
ng serve --open
网友评论