I'm having two subscriptions in my ngOnInit(), I'm using the result of the first sub in the second one like this:
 ngOnInit() {
    this.Context.state$.subscribe((site) => {
      this._siteId = site.id;
    });
    this.SummaryContext.state$.subscribe((summary) => {
      this._unityId = this.siteSummaryContext.getFromId(summary, this._siteId).unityId;
    });
}
the _siteId variable is declared globaly, but I can't use in the getFromId() method, it's undefined. what am I doing wrong ?
 
    