小编Ami*_*ram的帖子

为什么Powershell不运行Angular命令?

我已经开始学习Angular了,但是我注意到Windows中的powershell每当执行如下的angular命令时都会出现错误:

ng new new-app
Run Code Online (Sandbox Code Playgroud)

要么

ng serve
Run Code Online (Sandbox Code Playgroud)

这是我得到的错误:

ng : File C:\Users\< username >\AppData\Roaming\npm\ng.ps1 cannot be loaded because 
running scripts is disabled on this system. For more information, see 
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ ng serve
+ ~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
Run Code Online (Sandbox Code Playgroud)

PS我尝试在cmd中的这些命令,它的工作原理。

javascript powershell angular-cli angular

3
推荐指数
4
解决办法
1万
查看次数

标签 统计

angular ×1

angular-cli ×1

javascript ×1

powershell ×1