将引导程序导入到app.module.ts中后,出现意外的令牌<错误

时间:2019-04-20 19:53:13

标签: angular7 ngx-bootstrap angular-seed

angular-seed中安装了ngx-bootstrap 之后,我已经导入了app.modules.ts并在project.config.ts中添加了其他包 然后使用npm启动应用程序,启动它会返回意外令牌

  

app.modules.ts

    import { AlertModule } from "ngx-bootstrap";

    @NgModule({
    imports: [
     AlertModule.forRoot()
      ]})
  

project.config.ts


import { SeedConfig } from './seed.config';
import { ExtendPackages } from './seed.config.interfaces';

export class ProjectConfig extends SeedConfig {

  PROJECT_TASKS_DIR = join(process.cwd(), this.TOOLS_DIR, 'tasks', 'project');

  constructor() {
    super();
    .....

    const additionalPackages: ExtendPackages[] = [
      // required for dev build
      {
        name: 'ngx-bootstrap',
        path: 'node_modules/ngx-bootstrap',
        packageMeta: {
          main: 'bundles/ngx-bootstrap.umd.min.js',
          defaultExtension: 'js'
        }
      }
      ];
    this.addPackagesBundles(additionalPackages);


  }

}

0 个答案:

没有答案