Reputation: 2199
I want to pass big object between two pages .
project hangs(chunk error) when using of queryparam for routing big object.
What is the best way for pass big object between two pages with routing ?
Upvotes: 0
Views: 42
Reputation: 2413
You can create a dataService to share data:
import { Injectable } from '@angular/core';
@Injectable()
export class DataSharingService {
public data: any[] = [];
constructor() { }
set(property, data) {
this.data[property] = data;
}
get(property) {
return this.data[property];
}
}
Upvotes: 1