小编Geo*_*ugu的帖子

类型“typeof NgxJsonLdModule”上不存在属性“forRoot”

我已经安装了这个包@ngx-lite/json-ld。试图使我的 SEO schema.org 动态化。在导入本教程中指定的模块时,我收到此错误:

src/app/app.module.ts(18,21) 中的错误:错误 TS2339:“typeof NgxJsonLdModule”类型上不存在“forRoot”属性。

这是我的 app.module

import { NgtUniversalModule } from "@ng-toolkit/universal";
import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from "@angular/core";

// Third Party library
import { NgxJsonLdModule } from "@ngx-lite/json-ld";

import { AppComponent } from "./app.component";
import { AppRoutingModule } from "./app-routing.module";
@NgModule({
  declarations: [AppComponent],
  imports: [
     AppRoutingModule,
     NgtUniversalModule,
     NgxJsonLdModule.forRoot()
  ],
  providers: []
})
export class AppModule {}
Run Code Online (Sandbox Code Playgroud)

我正在使用 angular 6.1.9 和 Angular Universal。

npm angular-universal angular

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

angular ×1

angular-universal ×1

npm ×1