Inject angularjs service into Angular
<p>I'm trying to use <code>$log</code> service into an angular 2, According to what I read you need the following steps:</p>

<ol>
<li>Create a module that contains the service you want to inject.</li>
<li>Call UpgradeAdapter's upgradeNg1Provider method.</li>
</ol>

<p>So, I did the following </p>

<pre><code>  var initInjector = angular.injector(['ng']);
  var $log = initInjector.get('$log');
  angular.module('Services1', [])
    .service('$log', [$log]);
  upgradeAdapter.upgradeNg1Provider('$log');
</code></pre>

<p>Then I create an angular 2 component as the following</p>

<pre><code>    @Component({   selector: "ion-app",   template:"&lt;p&gt;Test&lt;/p&gt;" })
    @Injectable()
    export class HelloIonicPage {
      message: string;
      constructor( @Inject('$log') $log) {
        this.message = "Hi";
      }
    }
</code></pre>

<p>But when I run the application it gives me the following error:</p>

<blockquote>
  <p>ORIGINAL EXCEPTION: No provider for $log!</p>
</blockquote>

<p>Also, I tried to <code>bootstrap</code> using <code>upgradeAdapter</code>:</p>

<pre><code>  upgradeAdapter.bootstrap(document.documentElement, ['Services1'])
</code></pre>

<p>But that didn't work also.
Please note that  I'm using Ionic 2 framework and the above code is written inside </p>

<pre><code>    this.platform.ready().then(() =&gt; { 
            //The code is going here
});
</code></pre>