天蓝色devops生成期间的角度错误

时间:2018-11-14 02:11:59

标签: javascript angular azure-devops

我目前正在为.net核心和角度应用程序创建CI / CD管道。

构建中的步骤之一是使用npm build命令。

在此步骤中,出现以下错误:

这是我的应用程序路由模块的样子:



    import { NgModule } from '@angular/core';
    import { RouterModule, Routes } from '@angular/router';
    import { CanActivateGuard } from './shared/guards/can-activate.guard';
    import { HomeComponent } from './home/home.component';
    import { UnauthorizedComponent } from './unauthorized/unauthorized.component';
    import { ForbiddenComponent } from './forbidden/forbidden.component';
    import { NotFoundComponent } from './not-found/not-found.component';
    import { ClientModule } from './client/client.module';
    import { UserModule } from './user/user.module';
    import { SuperUserModule } from './super-user/super-user.module';
    import { LicenseModule } from './license/license.module';
    import { IsAdminGuard } from './shared/guards/Admin/isAdmin.guard';
    import { ApplicationsComponent } from './applications/applications.component';// 
    import { DashboardComponent } from './dashboard/dashboard.component';

    const routes: Routes = [
      { path: '', redirectTo: '/home', pathMatch: 'full' },
      { path: 'home', component: HomeComponent },
      { path: 'applications', component: ApplicationsComponent }, //Added By Kumar Arpit For Role Based Redirection Functionality
      { path: 'dashboard', component: DashboardComponent }, //Added By Kumar Arpit For Dashboard
      { path: 'unauthorized', component: UnauthorizedComponent },
      { path: 'forbidden', component: ForbiddenComponent },
      { path: 'clients', loadChildren: () => ClientModule, canActivate: [IsAdminGuard] },
      { path: 'users', loadChildren: () => UserModule, canActivate: [IsAdminGuard]},
      { path: 'superusers', loadChildren: () => SuperUserModule, canActivate: [IsAdminGuard] },
      { path: 'license', loadChildren: () => LicenseModule, canActivate: [IsAdminGuard] },
      { path: '**', component: NotFoundComponent },
    ];

    @NgModule({
      imports: [ RouterModule.forRoot(routes) ],
      exports: [ RouterModule ]
    })
    export class AppRoutingModule { }

请帮助我找出可能出问题的地方。谢谢。

0 个答案:

没有答案