title: How to use vendor.ts from https://angular.io/docs/ts/latest/guide/webpack.html
body: <p>According to <a href="https://angular.io/docs/ts/latest/guide/webpack.html" rel="nofollow">https://angular.io/docs/ts/latest/guide/webpack.html</a> you should be able to add vendors like jquery in the vendor.ts file</p>
  
  <pre><code>// Other vendors for example jQuery, Lodash or Bootstrap
  // You can import js, ts, css, sass, ...
  </code></pre>
  
  <p>what i have done so far</p>
  
  <pre><code>typings install dt~jquery --global --save
  npm install jquery --save
  </code></pre>
  
  <p>and i added this line to vendor.ts</p>
  
  <pre><code>import 'jquery'
  </code></pre>
  
  <p>webpack run without an error. But I am not able to use jQuery in my Component.</p>
  
  <pre><code>import { Component, OnInit, ElementRef } from '@angular/core';
  
  @Component({
    selector: 'table-widget',
    templateUrl: 'table-widget.component.html'
  })
  
  export class TableWidgetComponent implements OnInit {
  
   constructor(private _elRef: ElementRef) {
  
   }
  
   ngOnInit() : void {
     $(this._elRef.nativeElement).find('button').on('click', function() { alert("it works");  });
   }
  }
  </code></pre>
  
  <p>what am i doing wrong here?</p>