doing a fetch data file and be able to edit modified exercises
use the following code to implement these code, but I can"t understand them.
can someone explain to me roughly what the following code is doing
service:
import { test} from "./dataT";
import { BehaviorSubject } from "rxjs/BehaviorSubject";
import "rxjs/add/operator/map";
import "rxjs/add/operator/catch";
import { Observable } from "rxjs/Rx"
private sessionStatus = new BehaviorSubject<any>([]);
currentSession = this.sessionStatus.asObservable();
changeSession(obj) {
this.sessionStatus.next(obj);
}
component:
onlineStatus
this.tableDataService.currentSession.subscribe(session => this.onlineStatus = session);
dataT:
export let test= [
{
"abc1": "a",
"abc2": "b",
"abc3": "c"
},
{
"abc1": "",
"abc2": "",
"abc3": "PT"
}
]