Jhipster路由器出口组件不是任何NgModule的一部分,或者该模块尚未导入到您的模块中

时间:2019-05-10 12:14:40

标签: angular jhipster

我试图将'brDocumentos'路由器出口到'brTramites'中,而当我试图将其插入模块时,我一直在说。

组件BrDocumentoComponent不是任何NgModule的一部分,或者该模块尚未导入到您的模块中。

这是我的代码

br-tramites.module.ts

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterModule } from '@angular/router';
import { JhiLanguageService } from 'ng-jhipster';
import { JhiLanguageHelper } from 'app/core';

import { BandejaElectronicaSharedModule } from 'app/shared';
import {
    BrTramiteComponent,
    BrTramiteDetailComponent,
    BrTramiteUpdateComponent,
    BrTramiteDeletePopupComponent,
    BrTramiteDeleteDialogComponent,
    brTramiteRoute,
    brTramitePopupRoute
} from './';
import { SidebarComponent } from 'app/sidebar/sidebar.component';
import { BreadcrumbComponent } from 'app/breadcrumb/breadcrumb.component';
import { BandejaElectronicaBreadcrumbModule } from 'app/breadcrumb/breadcrumb.module';
import { BandejaElectronicaSidebarModule } from 'app/sidebar/sidebar.module';
import { BrDocumentoDeleteDialogComponent } from '../br-documento/br-documento-delete-dialog.component';
import { MatDatepickerModule, MatNativeDateModule } from '@angular/material';
import { BrDocumentoComponent } from '../br-documento/br-documento.component';

const ENTITY_STATES = [...brTramiteRoute, ...brTramitePopupRoute];

@NgModule({
    imports: [BandejaElectronicaSharedModule, RouterModule.forChild(ENTITY_STATES),
        BandejaElectronicaBreadcrumbModule, BandejaElectronicaSidebarModule, MatDatepickerModule, MatNativeDateModule],
    declarations: [
        BrTramiteComponent,
        BrTramiteDetailComponent,
        BrTramiteUpdateComponent,
        BrTramiteDeleteDialogComponent,
        BrTramiteDeletePopupComponent,
        BrDocumentoDeleteDialogComponent,
        BrDocumentoComponent
    ],
    entryComponents: [BrTramiteComponent, BrTramiteUpdateComponent, BrTramiteDeleteDialogComponent, BrTramiteDeletePopupComponent,
        BreadcrumbComponent, SidebarComponent, BrDocumentoDeleteDialogComponent, BrDocumentoComponent],
    providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }],
    schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class BandejaElectronicaBrTramiteModule {
    constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) {
        this.languageHelper.language.subscribe((languageKey: string) => {
            if (languageKey !== undefined) {
                this.languageService.changeLanguage(languageKey);
            }
        });
    }
}

br-documento.module.ts

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterModule } from '@angular/router';
import { JhiLanguageService } from 'ng-jhipster';
import { JhiLanguageHelper } from 'app/core';

import { BandejaElectronicaSharedModule } from 'app/shared';
import {
    BrDocumentoComponent,
    BrDocumentoDetailComponent,
    BrDocumentoUpdateComponent,
    BrDocumentoDeletePopupComponent,
    brDocumentoRoute,
    brDocumentoPopupRoute
} from './';
import { BrDocumentoService } from './br-documento.service';

const ENTITY_STATES = [...brDocumentoRoute, ...brDocumentoPopupRoute];

@NgModule({
    imports: [BandejaElectronicaSharedModule, RouterModule.forChild(ENTITY_STATES)],
    declarations: [
        BrDocumentoDetailComponent,
        BrDocumentoUpdateComponent,
        BrDocumentoDeletePopupComponent,
    ],
    entryComponents: [BrDocumentoUpdateComponent, BrDocumentoDeletePopupComponent, BrDocumentoComponent],
    providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }, BrDocumentoService],
    schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class BandejaElectronicaBrDocumentoModule {
    constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) {
        this.languageHelper.language.subscribe((languageKey: string) => {
            if (languageKey !== undefined) {
                this.languageService.changeLanguage(languageKey);
            }
        });
    }
}

我是jhipster的新手,一个星期后不知道如何解决这个问题。

0 个答案:

没有答案