简体   繁体   English

如何在 jhipster 中创建新的角度组件

[英]How to create new angular component in jhipster

I have created a new project using jhipster and imported it into Intellij.我使用 jhipster 创建了一个新项目并将其导入 Intellij。 When i try to create a new angular component i get an error.Here is what i did:当我尝试创建一个新的角度组件时,出现错误。这是我所做的:

File >> New >> Angular cli >> component > ok.文件 >> 新建 >> Angular cli >> 组件 > ok。

I get the following error:我收到以下错误:

C:\\Program Files\\nodejs\\node.exe" D:/TestareJhipster/Testare1/node_modules/@angular/cli\\bin\\ng generate component cacat Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule. Error: Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule. Done C:\\Program Files\\nodejs\\node.exe" D:/TestareJhipster/Testare1/node_modules/@angular/cli\\bin\\ng generate component cacat 找不到新组件的 NgModule。使用跳过导入选项跳过在 NgModule 中导入组件。错误:找不到新组件的 NgModule。使用跳过导入选项跳过在 NgModule 中导入组件。完成

Is there another way to create a component?有没有另一种方法来创建组件?

Another way with JHipster is to run: JHipster 的另一种方法是运行:

jhipster entity yourEntityName --skip-server

From JHipster official documentation ( http://www.jhipster.tech/creating-an-entity/ )来自 JHipster 官方文档 ( http://www.jhipster.tech/creating-an-entity/ )

This will skip the server-side code and will generate only the client-side code.这将跳过服务器端代码,只生成客户端代码。

Alternatively this answer might help you as well: https://stackoverflow.com/a/46269000/2815598或者,此答案也可能对您有所帮助: https : //stackoverflow.com/a/46269000/2815598

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM