Подписаться Наблюдаемая стоимость

Когда я регистрирую значение моей переменной внутри подписки, у меня есть значение, но когда я делаю это вне его, я получаю неопределенное значение ???:

this._postService.getConf("app/conf/conf.json")
   .subscribe(res =>{
      this.home = JSON.stringify(res);
      console.log("value :" + this.home);

я хочу инициализировать мою домашнюю переменную с определенным значением, которое я делаю для ngOnInit, но оно получает неопределенное значение, когда я пытаюсь получить его снаружи:

Это моя функция:

getConf(url) {
   return this._http.get(url).
      map(res => {return res.json()});
}

ngOnInit() {

  this._postService.getConf("app/conf/conf.json")
   .subscribe(res => {
        this.home = JSON.stringify(res);
        console.log("hahowaaaaaaaa" + this.home);
   }
  );

  this._postService.getPosts(this.home)
  .subscribe(result =>{ 
    this.loading = false;
    this.actionsG = result; 
    var count = JSON.stringify(result);

    this.aCount = count.substring(count.indexOf(','),23);

  },error=> console.error('Error: ' + error), ()=> console.log('finish! ActionsG'));

  this._postService.getPosts(this.home ).subscribe(result => this.actionsV = 
    result, error=> console.error('Error: ' + error), ()=> console.log('finish! ActionsV ngOnInit' + this.page));
}

Ответы на вопрос(2)

Ваш ответ на вопрос