【发布时间】:2026-01-19 11:35:01
【问题描述】:
如何在 Angular 中使用 Rxjs 库的过滤器、映射或跳过运算符在订阅之前跳过服务中的特定数据值(全名)
基本上,我只需要在订阅服务之前使用运算符来获取所需的数据并跳过一些数据值
this.employee-service.my-Service(page-Number-And-Records-Per-Page)
.pipe(skip(1),)
.subscribe(
//https://angular.io/tutorial/toh-pt4
(res) => {
console.log(res.data);
this.employees = res.data;
this.sorting(); //A-Z is default
}
);
【问题讨论】:
-
如果我理解您的问题,您可以使用
filter()。