private customer: Subject<Object> = new BehaviorSubject<Object>(null);
setCustomer(id, accountClassCode) {
this.customer.next({'id': id, 'accountClassCode': accountClassCode});
}
getCustomer() {
return this.customer.asObservable();
}
I'm using this part of code but I'm getting an error that can not find id of null. Is there any solution to get initial value that is not null?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…