title: Error when using global variables with Ionic 3
body: <p>I'm using Ionic 3 and I have made a class for globals variables but I get this error</p>
  
  <pre><code>Uncaught (in promise): Error: No provider for Globals! Error: No provider for Globals! at injectionError 
  (http://localhost:8100/build/vendor.js:1590:86) at noProviderError 
  </code></pre>
  
  <p>This is the <strong>news.ts</strong> file</p>
  
  <pre><code>import {Globals} from "../../app/globals";
  
  constructor(private globals: Globals, public navCtrl: NavController, public navParams: NavParams, private http: Http) {
  
      this.getData();
  }
  
  getData()
  {
    this.http.get(this.globals.baseUrl + 'articles').map(res =&gt; res.json()).subscribe(data =&gt; {
        this.results = data;
        console.log(data)
    });
  }
  </code></pre>
  
  <p>and I have tried to import in the <strong>app.mudule</strong> in the providers but get another error:</p>
  
  <pre><code>Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files.
  </code></pre>
  
  <p>this is the <strong>app.module.ts</strong> file , Globals is imported but not declared in providers:</p>
  
  <pre><code>import {NgModule, ErrorHandler} from '@angular/core';
  import {BrowserModule} from '@angular/platform-browser';
  import {IonicApp, IonicModule, IonicErrorHandler} from 'ionic-angular';
  import {MyApp} from './app.component';
  import {Globals} from 'globals';
  
  import {TabsPage} from '../pages/tabs/tabs';
  import {NewsPage} from '../pages/news/news';
  
  import {StatusBar} from '@ionic-native/status-bar';
  import {SplashScreen} from '@ionic-native/splash-screen';
  import { HttpModule } from '@angular/http';
  
  import {enableProdMode} from '@angular/core';
  enableProdMode();
  
  @NgModule({
     declarations: [
      MyApp,
      TabsPage,
      NewsPage
  ],
  imports: [
      BrowserModule,
      IonicModule.forRoot(MyApp),
      HttpModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
      MyApp,
      TabsPage,
      NewsPage
  ],
  providers: [
      StatusBar,
      SplashScreen,
      {provide: ErrorHandler, useClass: IonicErrorHandler},
  ]
  })
  export class AppModule {
  }
  </code></pre>
  
  <p>This the file globals.ts :</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  
  
  @Injectable()
  export class Globals {
     baseUrl: string = 'http://127.0.0.1/rest/web/app_dev.php/api/';
     uploadRootDir: string = 'http://localhost/rest/web/';
  }
  </code></pre>