问题描述
我正在尝试在Angular5项目中使用NgxPaginationModule 无法解析符号NgxPaginationModule ,我已按照记录进行了所有步骤
I am trying to use NgxPaginationModule in my Angular5 project cannot resolve symbol NgxPaginationModule , i followed all step as documented
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { GlobalModule } from './global/global.module';
import { ProtectedModule} from './protetcted/protect-module.component';
import { AppRoutingModule } from './app.routing.module';
import {NgxPaginationModule} from 'ngx-pagination';//cannot resolve symbol NgxPaginationModule
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
GlobalModule,
ProtectedModule,
AppRoutingModule,
NgxPaginationModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
我检查了节点模块和ngx-pagination文件夹是否存在,可以提示引起此错误的原因是什么
I checked node modules and ngx-pagination folder exist can any one suggest what causing this error?
推荐答案
在Azure CI构建期间,我也发生了同样的事情:
This same thing is happening to me during an Azure CI build:
无法相对于D:/a/7/s/src/app/app.module.ts解析ngx分页.找不到模块'ngx-pagination
Could not resolve ngx-pagination relative to D:/a/7/s/src/app/app.module.ts.Cannot find module 'ngx-pagination
app.module.ts:
app.module.ts:
//从'ngx-pagination'导入{NgxPaginationModule};//<-导入模块进口:[BrowserModule,FormsModule,ReactiveFormsModule,HttpClientModule,AppRoutingModule,NgbModule.forRoot(),//NgxPaginationModule]
// import { NgxPaginationModule } from 'ngx-pagination'; // <-- import the moduleimports: [ BrowserModule, FormsModule, ReactiveFormsModule, HttpClientModule, AppRoutingModule, NgbModule.forRoot(), // NgxPaginationModule ],
在本地工作正常.
这篇关于无法解析符号NgxPaginationModule的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!