title: Angular2 : Cannot read property 'vcRef' of undefined
body: <p>I had used Angular-cli for the initial code setup. I need to integrate <strong>Angular 2: Toastr</strong> library but some how i'm not able to use. It was working fine when i had used without Angular-cli format. I'm getting following error. when i execute the toast code.</p>
  
  <pre><code>error_handler.js:47 EXCEPTION: Uncaught (in promise): TypeError: Cannot read property 'vcRef' of undefined
  TypeError: Cannot read property 'vcRef' of undefined
  at http://localhost:4200/main.bundle.js:42306:101
  at new ZoneAwarePromise (http://localhost:4200/main.bundle.js:63592:29)
  at ToastsManager.show (http://localhost:4200/main.bundle.js:42297:16)
  at ToastsManager.success (http://localhost:4200/main.bundle.js:42395:21)
  at AppComponent.showSuccess (http://localhost:4200/main.bundle.js:41105:21)
  at CompiledTemplate.proxyViewClass.View_AppComponent0.handleEvent_0 (/AppModule/AppComponent/component.ngfactory.js:34:34)
  at CompiledTemplate.proxyViewClass.&lt;anonymous&gt; (http://localhost:4200/main.bundle.js:52326:37)
  at HTMLButtonElement.&lt;anonymous&gt; (http://localhost:4200/main.bundle.js:27715:36)
  at ZoneDelegate.invokeTask (http://localhost:4200/main.bundle.js:63339:35)
  at Object.onInvokeTask (http://localhost:4200/main.bundle.js:25786:37)
  </code></pre>
  
  <p>I'm executing following code,</p>
  
  <pre><code>import {Component} from "@angular/core";
  import { ToastsManager } from 'ng2-toastr/ng2-toastr';
  
  @Component({
    selector: 'app-root',
    template: '&lt;button class="btn btn-default" (click)="showSuccess()"&gt;Toastr Tester&lt;/button&gt;'
  })
  export class AppComponent {
  
    constructor(public toastr: ToastsManager) {
    }
  
    showSuccess() {
      this.toastr.success('You are awesome!', 'Success!');
    }
  }
  </code></pre>
  
  <p><strong>Angular version 2.2.1</strong></p>
  
  <p>Thanks in advance.</p>