Tuesday, July 17, 2018

angular - Cannot find name 'jquery' in angular2



I am working on to use the ng2-datetime. Installed through npm, but when I build the solution, I am getting an error that cannot find name 'jQuery'.



I have added the jQuery through npm and also tried to include the jquery library, but the issue still persists.
Can anyone tell what else to include? I'm using angular 2.2 with typescript and my IDE is VS2015



app.module.ts




just added the import statement



import { NKDatetimeModule } from 'ng2-datetime/ng2-datetime';


and under imports



@NgModule({
imports:[NKDatetimeModule ])}


Answer



I got it working by installing @types/jquery from npm.


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...