Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 使用角5设置国家代码ngx intl tel输入_Angular_Ngx International Phone Number - Fatal编程技术网

Angular 使用角5设置国家代码ngx intl tel输入

Angular 使用角5设置国家代码ngx intl tel输入,angular,ngx-international-phone-number,Angular,Ngx International Phone Number,正在尝试实现,但出现错误 下面是一些包更改的示例 请遵循ngx引导、angular和其他相关内容的版本。我认为这是一个兼容性问题 这是我的套餐: "dependencies": { "@angular-devkit/schematics": "0.0.35", "@angular/animations": "^5.2.11", "@angular/common": "^5.2.8", "@angular/core": "^5.2.8", "@angular/forms": "^5.2.8", "

正在尝试实现,但出现错误

下面是一些包更改的示例

请遵循ngx引导、angular和其他相关内容的版本。我认为这是一个兼容性问题

这是我的套餐:

"dependencies": {
"@angular-devkit/schematics": "0.0.35",
"@angular/animations": "^5.2.11",
"@angular/common": "^5.2.8",
"@angular/core": "^5.2.8",
"@angular/forms": "^5.2.8",
"@angular/http": "^5.2.8",
"@angular/platform-browser": "^5.2.8",
"@angular/platform-browser-dynamic": "^5.2.8",
"@angular/platform-server": "^5.2.8",
"@angular/router": "^5.2.8",
"@nguniversal/express-engine": "^5.0.0-beta.6",
"@nguniversal/module-map-ngfactory-loader": "^5.0.0",
"amazon-cognito-auth-js": "^1.0.0",
"amazon-cognito-identity-js": "^1.21.0",
"angular-in-memory-web-api": "^0.5.1",
"bootstrap": "4.0.0-beta.2",
"core-js": "^2.4.1",
"express-http-proxy": "^1.1.0",
"font-awesome": "^4.7.0",
"google-libphonenumber": "^3.2.6",
"intl-tel-input": "^16.0.7",
"jquery": "^3.2.1",
"ng2-pdf-viewer": "4.1.2",
"ngx-bootstrap": "^3.0.1",
"ngx-cookie-service": "^2.1.0",
"ngx-embed-video": "^0.3.0",
"ngx-intl-tel-input": "^2.0.7",
"ngx-quill": "^3.4.0",
"popper.js": "^1.12.6",
"primeng": "^5.2.4",
"quill": "^1.3.6",
"rxjs": "^5.4.2",
"ts-loader": "^3.5.0",
"typescript-base64-arraybuffer": "^0.1.0",
"zone.js": "^0.8.14"
}

以下行(文件:node modules/ngx intl tel input/fesm5/ngx intl tel input.js)中有错误:

NgxIntlTelInputService.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgxIntlTelInputService_Factory() { return new NgxIntlTelInputService(); }, token: NgxIntlTelInputService, providedIn: "root" });
Uncaught TypeError: Object(...) is not a function
at eval (ngx-intl-tel-input.js:22)
at eval (ngx-intl-tel-input.js:24)
at Object../node_modules/ngx-intl-tel-input/fesm5/ngx-intl-tel-input.js (vendor.bundle.js:3684)
at __webpack_require__ (inline.bundle.js:55)
at eval (app.module.ts:26)
at Object../src/app/app.module.ts (main.bundle.js:235)
at __webpack_require__ (inline.bundle.js:55)
at eval (main.ts:4)
at Object../src/main.ts (main.bundle.js:3515)
at __webpack_require__ (inline.bundle.js:55)
错误是:

NgxIntlTelInputService.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgxIntlTelInputService_Factory() { return new NgxIntlTelInputService(); }, token: NgxIntlTelInputService, providedIn: "root" });
Uncaught TypeError: Object(...) is not a function
at eval (ngx-intl-tel-input.js:22)
at eval (ngx-intl-tel-input.js:24)
at Object../node_modules/ngx-intl-tel-input/fesm5/ngx-intl-tel-input.js (vendor.bundle.js:3684)
at __webpack_require__ (inline.bundle.js:55)
at eval (app.module.ts:26)
at Object../src/app/app.module.ts (main.bundle.js:235)
at __webpack_require__ (inline.bundle.js:55)
at eval (main.ts:4)
at Object../src/main.ts (main.bundle.js:3515)
at __webpack_require__ (inline.bundle.js:55)

请尝试2.0.4版或更低版本的
ngx intl tel input

首先,删除以前的安装,然后:

npm i ngx-intl-tel-input@2.0.4

好的,我会试着讨论一下。添加2.0.4后,
SearchCountryField、TooltipLabel、CountryISO
这些字段在ngx intl电话输入中找不到查看此stackblitz:你能在你的应用程序上进行ng更新吗?或者试试另一个库,我会在stalkbiz的machinelook中重新创建你的代码。我的机器也有同样的问题。如果我们能在stackbiz中解决它,那么它就解决了