Commits

Giuseppe Digilio authored cc4b7b215e0
Prevent that RouteService is instantiated two times on both SSR and CSR
No tags

src/app/core/services/route.service.ts

Modified
52 52 return state[key];
53 53 } else {
54 54 return undefined;
55 55 }
56 56 });
57 57 }
58 58
59 59 /**
60 60 * Service to keep track of the current query parameters
61 61 */
62 -@Injectable()
62 +@Injectable({
63 + providedIn: 'root'
64 +})
63 65 export class RouteService {
64 66 constructor(private route: ActivatedRoute, private router: Router, private store: Store<CoreState>) {
65 67 this.saveRouting();
66 68 }
67 69
68 70 /**
69 71 * Retrieves all query parameter values based on a parameter name
70 72 * @param paramName The name of the parameter to look for
71 73 */
72 74 getQueryParameterValues(paramName: string): Observable<string[]> {

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut