简体   繁体   English

Angular2套接字问题

[英]Angular2 Socket Issue

Hi Im facing Error while working on Socket.io in Angular 2 I have imported Everything required in typings.json,System.comfig.js, and in Package.json files and im using it in .ts file by using below statement 嗨,我在Angular 2中在Socket.io上工作时遇到错误,我导入了types.json,System.comfig.js和Package.json文件中所需的所有内容,并通过使用以下语句在.ts文件中使用了im

import * as io from "socket.io-client";

everything is fine till Now when im loading the project i could see below error 一切都很好,直到现在我正在加载项目时,我可以看到以下错误

(index):18 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:1000/socket.io-client (索引):18错误:(SystemJS)XHR错误(404未找到)正在加载http:// localhost:1000 / socket.io-client

Please Help Me 请帮我

use npm install @types/socket.io-client --save 使用npm install @types/socket.io-client --save

see https://github.com/angular/angular-cli/issues/1278 for more info 有关更多信息,请参见https://github.com/angular/angular-cli/issues/1278

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM