I'm subscribing to an API call using the following code:
this.af.database.list("URL")
.subscribe((lineList) => {
this.lineList = lineList;
this.fullLineList = lineList;
});
Whenever I access this.lineList
in my component, this.fullLineList
changes too.
How I can store a variable which stores lineList
and is note affected by this.lineList
changes?