New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant connect jQuery plugin #2129
Comments
import * as $ from 'jquery'; |
cant find module 'jquery' |
|
Is there any updates about this issue? |
I am connect libraries using CDN, its working (jquery and jquery plugin) |
@nikitarakitin I'm not using CDN libraries. I did installation of the package via npm, then install |
I got the same problem!
2 Install jQuery TypeScript autocomplete
4 I restart by : ng serve But it is still occur message:
Anyone have solve? |
I had the same error, I solved it by updating node to latest version: https://nodejs.org/en/download/ |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Windows 10
ng --version
. If there's nothing outputted, please runin a Terminal:
node --version
and paste the result here:angular-cli: 1.0.0-beta.14
node: 5.12.0
os: win32 x64
do on your code? etc.
more information.
EXCEPTION: Error: Uncaught (in promise): EXCEPTION: Error in ./InitOrderComponent class InitOrderComponent_Host - inline template:0:0
ORIGINAL EXCEPTION: TypeError: jQuery(...).intlTelInput is not a function
ORIGINAL STACKTRACE:
intlTelInput.js:15 Uncaught ReferenceError: jQuery is not defined(anonymous function) @ intlTelInput.js:15(anonymous function) @ intlTelInput.js:17
lang.js:310Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
I want to use jQuery plugin (https://github.com/jackocnr/intl-tel-input), but i cant connect it. I think that library cant connect with jQuery, because i can use jQuery in my project only that way: let jQuery = require('jQuery'); require('jquery') not working.
My angular-cli.json:
{
"project": {
"version": "1.0.0-beta.11-webpack.8",
"name": "order-page"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": "assets",
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"mobile": false,
"styles": [
"styles.css",
"../node_modules/intl-tel-input/build/css/intlTelInput.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/intl-tel-input/build/js/intlTelInput.js"
],
"environments": {
"source": "environments/environment.ts",
"prod": "environments/environment.prod.ts",
"dev": "environments/environment.dev.ts"
}
}
],
"addons": [],
"packages": [],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"prefixInterfaces": false,
"lazyRoutePrefix": "+"
}
}
package.json:
{
"name": "order-page",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint "src/*/.ts"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
"core-js": "^2.4.0",
"intl-tel-input": "9.0.9",
"jquery": "^3.1.0",
"moment": "^2.15.0",
"ng2-bootstrap": "1.1.0",
"process-nextick-args": "^1.0.7",
"rxjs": "5.0.0-beta.11",
"ts-helpers": "^1.1.1",
"zone.js": "0.6.12"
},
"devDependencies": {
"@types/jasmine": "^2.2.30",
"@types/jquery": "^1.10.31",
"angular-cli": "1.0.0-beta.11-webpack.8",
"codelyzer": "~0.0.26",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "0.13.22",
"karma-chrome-launcher": "0.2.3",
"karma-jasmine": "0.3.8",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.3",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "^2.0.0"
}
}
The text was updated successfully, but these errors were encountered: