【发布时间】:2019-06-25 19:06:00
【问题描述】:
我有以下课程
export class filter {
public PageRecords: number;
public SearchText: string;
public SortColumn: string = null;
public SortDirection: string = null;
public StartingPos: number;
}
以下行为主题
filterParam = new BehaviorSubject(new filter);
更新主题
this.filterParam.next(<filter>{StartingPos : 1,PageRecords : 10 })
当我得到主题的价值时
this.filterParam.value
它只有我更新的两个道具 StartingPos 和 PageRecords。它失去了其他道具。
如何解决?
【问题讨论】:
标签: angular rxjs observable angular7 behaviorsubject