Skip to content

WebPack: jquery + bootstrap-sass #1622

@Daredzik

Description

@Daredzik
  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Debian 8.5
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0-beta.11-webpack
node: 6.2.2
os: linux x64
  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

npm install --save jquery
npm install --save bootstrap-sass

now in pollyfils.ts add:

import 'jquery';
import 'bootstrap-sass/assets/javascripts/bootstrap';

ng serve

  1. The log given by the failure. Normally this include a stack trace and some
    more information.
    in bundled js, i can find jquery lib, but in console i get 'Error: Bootstrap's JavaScript requires jQuery'
  2. Mention any other details that might be useful.
    i try the way to add in main.ts
    import $ from 'jquery'; or import * as jQuery from 'jquery'; but nothing change.

Any ideas ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulfeatureIssue that requests a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions