Angular 如何使Stackblitz 6.0.6找到;“涂底漆”;模块?(作为依赖项添加了Priming 6.0.0)

Angular 如何使Stackblitz 6.0.6找到;“涂底漆”;模块?(作为依赖项添加了Priming 6.0.0),angular,primeng,stackblitz,Angular,Primeng,Stackblitz,我在Stackblitz(Angular 6.0.6)中添加了Priming(6.0.0)作为依赖项,并尝试导入Priming模块(例如TreeModule),但没有找到它,您可以在下面的Stackblitz中看到代码: 找不到启动模块 知道如何修复它吗?只是由于某种原因,智能传感器找不到模块,并给出了一个错误。否则,如果在AppModule中导入TreeModule,代码将起作用 import { NgModule } from '@angular/core'; import { Brows

我在Stackblitz(Angular 6.0.6)中添加了Priming(6.0.0)作为依赖项,并尝试导入Priming模块(例如TreeModule),但没有找到它,您可以在下面的Stackblitz中看到代码:

找不到启动模块


知道如何修复它吗?

只是由于某种原因,智能传感器找不到模块,并给出了一个错误。否则,如果在AppModule中导入TreeModule,代码将起作用

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';
import { HelloComponent } from './hello.component';

import {TreeModule} from 'primeng/tree';


@NgModule({
  imports:      [ BrowserModule, FormsModule, BrowserAnimationsModule, TreeModule ],
  declarations: [ AppComponent, HelloComponent ],
  bootstrap:    [ AppComponent ]
})
export class AppModule { }

这里有一个stakblitz示例的分支,我已经解决了这个问题。它仍然在编辑器中显示错误。我还在styles.css文件中添加了样式,以便正确显示。

要像您那样添加样式,也需要添加样式:@import url(“../node_modules/primeicons/primeicons.css”);@导入“~primeng/resources/themes/omega/theme.css”;@导入“~primeng/resources/primeng.min.css”;