如何在Jhipster 5中的其他模块中使用模块

时间:2019-03-01 02:09:08

标签: jhipster angular7

在我们的应用程序中的实体之间建立关系是很常见的。为了使构建屏幕更容易,我考虑过将实体的关系放在这样的导航标签中。

enter image description here

DriverContactAddress各自具有模块和关系。

relationship OneToMany {
  /** Driver contacts */
    Driver{contacts} to Contact
}

relationship OneToMany {
  /** Driver addresses */
    Driver{Addresses} to Address
}

我想知道如何在其他实体模块中使用实体模块。例如,驾驶员有联系方式和地址。我想用navbar制作一个屏幕,其中包含驱动程序的数据以及您的联系人及其地址。我看到了诸如thisthis之类的帖子,但没有成功。

我尝试了一些动作。但是作为后端开发人员,我遇到了一些困难。

我已经导入了模块,但是屏幕的行为发生了变化,仅呈现了导入的模块。

    import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterModule } from '@angular/router';

import { JjtManagerSharedModule } from 'app/shared';
import {
    DriverComponent,
    DriverDetailComponent,
    DriverUpdateComponent,
    DriverDeletePopupComponent,
    DriverDeleteDialogComponent,
    DriverRoute,
    DriverPopupRoute
} from './';
import {JjtManagerContatoModule} from "app/entities/contato/contato.module";

const ENTITY_STATES = [...DriverRoute, ...DriverPopupRoute];

@NgModule({
    imports: [JjtManagerSharedModule, JjtManagerContactModule, RouterModule.forChild(ENTITY_STATES)],
    declarations: [
        DriverComponent,
        DriverDetailComponent,
        DriverUpdateComponent,
        DriverDeleteDialogComponent,
        DriverDeletePopupComponent
    ],
    entryComponents: [DriverComponent, DriverUpdateComponent, DriverDeleteDialogComponent, DriverDeletePopupComponent],
    schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class JjtManagerDriverModule {}

0 个答案:

没有答案
相关问题