当将项目从Angular 8升级到Angular 9.1.x时,可能出现以下编译问题:
以下是一个简单的示例:
在Angular 8中:
在Angular 9.1.x中:
或者,我们也可以将其替换为:
在NgModule中,我们需要将ngx-infinite-scroll替换为infinite-scroll:
在Angular 8中:
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
@NgModule({ imports: [InfiniteScrollModule] })
export class MyModule { }
在Angular 9.1.x中:
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
@NgModule({ imports: [InfiniteScrollModule] })
export class MyModule { }
以上解决方法可以帮助您解决Angular 9.1.x中的编译问题。