gpt4 book ai didi

angular6 - Angular 6 ng lint select 已弃用

转载 作者:行者123 更新时间:2023-12-04 18:20:54 24 4
gpt4 key购买 nike

我得到了 tslint waring select 已弃用:从 6.1.0 开始。使用可管道
改为“选择”运算符。

我的选择器如下所示

private availableStudents$ = this.store.select(getAvailableStudents);

还有我的 package.json

“rxjs”:“^6.0.0”
“tslint”:“〜5.9.1”
“ typescript ”:“^2.9.2”
“@angular/cli”:“~6.1.2

最佳答案

尝试以下操作:

private availableStudents$ = this.store.pipe(select(getAvailableStudents));

上面使用了警告中建议的可管道运算符。

并确保导入它:

import { Store, select } from '@ngrx/store';

关于angular6 - Angular 6 ng lint select 已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51979412/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com