I am trying to set up angular 2 app based on webpack. I see that in vendor.ts we have that structure.
// Angular 2
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/core';
import '@angular/common';
import '@angular/http';
import '@angular/router';
// RxJS
import 'rxjs';
// Other vendors for example jQuery, Lodash or Bootstrap
// You can import js, ts, css, sass, ...
I want to import jQuery (for example) but I don't know what. Because when I tried to do that but it's not working. What I'm doing wrong? Thanks for any help.
import 'jquery/dist/jquery.min.js';
So I don't have idea why rxjs imported OK but jquery not :)
import $ from 'jquery'import { NgModule } from '@angular/core';- that way you can useNgModulein your code.