【发布时间】:2017-09-17 17:36:01
【问题描述】:
我正在尝试在 Visual Studio 代码中创建一个角度组件。默认情况下,我的 Angular 组件在 ClientApp 中。我在 ClientApp 中有一些默认组件。当我尝试在 ClientApp 的组件文件夹中添加新的角度组件时,出现错误。
当我输入“ng g component vehicle-form”时出现错误。它说“路径无效:“vehicle-form”不能位于“ClientApp\app”目录之上。”但是,我的 Angular 组件位于 Client App 的 app 文件夹中的 app 文件夹中。
PS C:\Users\Sushi\vega> cd ClientApp
PS C:\Users\Sushi\vega\ClientApp> cd 应用程序
PS C:\Users\Sushi\vega\ClientApp\app> cd 组件
PS C:\Users\Sushi\vega\ClientApp\app\components> ng g 组件 车形
路径无效:“vehicle-form”不能位于“ClientApp\app”之上 目录
我的 .angular-cli.json 配置如下。
"apps": [
{
"root": "ClientApp",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
【问题讨论】:
标签: c# angular asp.net-core visual-studio-code asp.net-core-2.0