How i should use modules with jquery dependency in Angular template? #936

Closed
opened 2025-08-09 17:18:14 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @kripergvg on 3/14/2017

I want to use module "ng2-datetime" that use jquery global variable.

What i do

mkdir PlayWithAngular
cd PlayWithAngular
yo aspnetcore-spa
npm install --save ng2-datetime

open up webpack.config.vendor.js
add 'ng2-datetime' to entry.vendor
open up app.module.ts
add import { NKDatetimeModule } from 'ng2-datetime/ng2-datetime';
and NKDatetimeModule, to imports
webpack --config webpack.config.vendor.js
but when i type
webpack
i get errors
image
i don't understand what i should do?
here sources https://github.com/wkololo4ever/playWithAngular

*Originally created by @kripergvg on 3/14/2017* I want to use module "ng2-datetime" that use jquery global variable. What i do ``` mkdir PlayWithAngular cd PlayWithAngular yo aspnetcore-spa npm install --save ng2-datetime ``` open up webpack.config.vendor.js add `'ng2-datetime' `to entry.vendor open up app.module.ts add `import { NKDatetimeModule } from 'ng2-datetime/ng2-datetime';` and NKDatetimeModule, to imports `webpack --config webpack.config.vendor.js` but when i type `webpack` i get errors ![image](https://cloud.githubusercontent.com/assets/7288803/23919958/e03aa526-0909-11e7-82e0-1a24a1c105af.png) i don't understand what i should do? here sources https://github.com/wkololo4ever/playWithAngular
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#936
No description provided.