Angular2 global variable observable
<p>I'm fairly new to angular2 and I'm kinda stuck on something.</p>

<p>I've created a global settings.service. This service fetches settings from an API and populate the settings model with the collected data.</p>

<p>The service:</p>

<pre><code>public settings : settingsModel;

constructor(public http: Http){ 
     this.setSettings()
         .subscribe(
             (data) =&gt; {
                  this.settings = data
             });
  }

setSettings() : Observable&lt;any&gt;{
   return : this.http.get('/settings')
            .map(response =&gt;  response.json());
}

getSettings(){
     return this.settings;
}
</code></pre>

<p>This works fine and the settings are correctly set when I test the return data in the .map </p>

<p>But when I try to call GetSettings from the component where I need this data, it returns empty. The service is defined in the bootstrap.</p>

<p>Do I need to make the 'settings' variable observable? Any help would be highly appreciated!</p>

<p>Tnx! </p>