jQuery is not defined for angular 2

前端 未结 3 646
猫巷女王i
猫巷女王i 2020-12-15 10:08

I am trying to use ng2-datetime. However, when I follow the instruction and installed npm install --save ng2-datetime, I get the following error.

I have tri

3条回答
  •  借酒劲吻你
    2020-12-15 10:56

    import * as $ from 'jquery';

    window['$'] = window['jQuery'] = $;

    The sencond line will fix your issue!

提交回复
热议问题