Tag: 量angular器

使用Node Js服务器运行Angular2应用程序

我正在用Angular2(客户端)和Node JS(服务器端)技术开始一个新项目。 我已经设法使用node和express创build一个RESTful API。 当input特定的URL时,显示匹配的Json响应。 到现在为止还挺好。 现在我正在尝试整合Angular 2。 我创build了app.component。 当页面显示时, 组件没有加载 ,我得到了一些404代码: Failed to load resource: 404 (not found) http://localhost:3000/node_modules/core-js/client/shim.min.js … Failed to load resource: 404 (not found) http://localhost:3000/systemjs.config.js 这是我的项目结构: ├── App | └── app.component.ts //copied from Angular2/get-started | └── main.ts // copied from Angular2/get-started ├── dist //contains generated JS files ├── node_modules ├── server […]

Angular2重复的标识符'PropertyKey'

我正在使用angular-cli构build一个angular2应用程序。 angular-in-memory-web-api未被默认安装。 所以我search了它,并在我的package.json文件中添加了这一行"angular-in-memory-web-api": "~0.1.5" 。 并没有npm install 。 在这之后,我带着这个错误Cannot find type definition file for 'core-js' #90 。 我在这个Github问题中find了一个解决scheme。 所以我运行这个命令npm install –save @types/core-jsbuild议由github-question 。 现在我面临这个错误。 ERROR in [default] /home/adil/Code/AngularJS.2/cli-based/mz-doc-app/node_modules/@types/core-js/index.d.ts:21:13 Duplicate identifier 'PropertyKey'. ERROR in [default] /home/adil/Code/AngularJS.2/cli-based/mz-doc-app/node_modules/@types/core-js/index.d.ts:85:4 All declarations of 'name' must have identical modifiers. ERROR in [default] /home/adil/Code/AngularJS.2/cli-based/mz-doc-app/node_modules/@types/core-js/index.d.ts:145:4 Subsequent variable declarations must have the same type. […]

Unmet Peer Dependency angular 2.3.0 rxjs zone.js

我一直不能满足rxjs和zone.js对等关系。 即使我删除了我的node_modules文件夹,清理npmcaching并重新安装它。 我的节点版本是6.7.0,npm版本是3.10.8。 这是我的package.json: { "name": "bingel-teacher", "version": "0.0.1", "description": "Bingel project", "main": "index.js", "scripts": { "postinstall": "typings install", "start": "webpack-dev-server –config webpack/webpack.dev.js –inline –hot –host 0.0.0.0 –port 8080", "build": "rimraf build && webpack –config webpack/webpack.build.js", "test": "karma start", "update": "npm install" }, "author": "", "license": "ISC", "engines": { "node": ">= 4.2.1", "npm": ">= 3" […]

UNMET PEER DEPENDENCY D3.js和Angular 2

我有一个现有的Angular 2项目,我正在尝试开始将一些D3.js集成到我的项目中。 我是Angular的新手,这将是我第一次使用D3。 我会按照这个教程: https : //keathmilligan.net/create-reusable-chart-components-with-angular-2-and-d3-js-version-4/ 我运行命令npm install –save d3 ,我得到: ├── UNMET PEER DEPENDENCY @angular/compiler@2.2.3 ├── UNMET PEER DEPENDENCY @angular/compiler-cli@2.2.3 ├── UNMET PEER DEPENDENCY @angular/core@2.2.3 └── d3@4.4.1 …然后 npm WARN @ngtools/webpack@1.2.1 requires a peer of @angular/compiler@^2.3.1 but none was installed. npm WARN @ngtools/webpack@1.2.1 requires a peer of @angular/compiler-cli@^2.3.1 but none was installed. npm […]

Webdriver – pipe理更新错误

我是使用量angular器的新手。 试图安装一个独立的webdriver-manager但得到以下错误。 Node v7.2.0 Protractor 5.0.0 webdriver-manager 11.1.1 当我运行webdriver-manger update –standalone我得到以下错误 [17:25:21] I/file_manager – creating folder C:\Users\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium [17:25:22] E/downloader – undefined [17:25:22] I/update – chromedriver: file exists C:\Users\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26win32.zip [17:25:22] I/update – chromedriver: unzipping chromedriver_2.26win32.zip **(node:14972) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Invalid filename (node:14972) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise […]

有没有一个杰克相当于nodejs?

在nodejs中是否有与Narhwal相关的杰克?

量angular器sendkeys不起作用:键码转换需要x显示

我正在尝试使用无头Chrome在Vagrant虚拟机内运行量angular器e2etesting。 我设法使用Xvfb工作,但是当我运行一个testing来填充表单时,我得到一个错误: 未知的错误:X代码转换需要X显示,考虑使用Xvfb 所有的testing运行良好,但只要我使用getKeys()(例如元素(by.model('user.email'))。sendKeys('admin');)我得到这个错误,即使我已经使用Xvfb。 我在跑: AngomanJS示例应用程序与Yeoman angular-fullstack生成器一起生成 Nodejs版本0.10.30,与nvm一起安装 stream浪者1.6.3 VirtualBox 4.3.14 主机操作系统Ubuntu 14.04 32位 客户操作系统Ubuntu 14.04 32位 铬37.0.2062.94 chromedriver 2.10.267517 我使用下面的shell脚本来启动Selenium和Xvfb: #!/ bin / sh的 webdriver-manager开始& Xvfb:1 -ac -screen 0 1280x1024x8& 导出DISPLAY =:1 我还添加了“export DISPLAY =:1”到/ opt / google / chrome / google-chrome。 同样,没有sendKeys()的testing运行良好。 我到目前为止所做的: 我正在运行32位的Ubuntu,所以我下载了chromedriver 2.10 32位,但没有帮助 我用–verbose运行chromedriver,并检查日志,但只显示相同的错误 我摆弄了Xvfb屏幕尺寸设置,也没有帮助 我在这里检查了一些源代码: https : //github.com/bayandin/chromedriver/blob/master/keycode_text_conversion_x.cc,并在第196行发现错误信息。当命令gfx :: […]

如何在Electron中使用node_modules

使用电子结合Angular2,Typescript和Electron我试图找出如何使用通过npm安装节点模块包。 目前的问题是我必须指定模块的位置,如var module = require('./node_modules/xyz/lib/xyz.js') 。 但是电子没有find位于./node_modules/xyz/node_modules/yyy内的xyz的依赖关系,并且抱怨./yyy.js找不到。 电子应用程序结构 dist ├── angular2.dev.js ├── config.js ├── index.html ├── main.js ├── node_modules ├── package.json └── app.js

量angular器无法parsingconf.js

我正在使用量angular器为e2etesting我的angular应用程序,但得到: TypeError:调用“量angular器conf.js”时,对象#没有方法“parsing” 这里是conf文件的内容: exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', capabilities: { 'browserName': 'chrome' }, specs: ['HomePageCtrl_spec.js'], chromeOnly: true, jasmineNodeOpts: { onComplete: null, isVerbose: false, showColors: true, includeStackTrace: true } }; 这里是我正在运行这个命令的例外: E:\eCOIGit\sidhome\SidHome\SidHome.Tests\ng-test-e2e>protractor Conf.js 错误: C:\ Users \ xqwt \ AppData \ Roaming \ npm \ node_modules \ protractor \ node_modules \ q \ q.js:12 6 throw […]

Angular 2 http post + Nodejs express

我无法在服务器上获得后参数。 我在Angular 2应用程序中发送请求到Nodejs express服务器。 在这里我的代码在Angular 2中: import { Injectable } from 'angular2/core'; import { Http } from 'angular2/http'; @Injectable() export class QueryService { static get parameters() { return [[Http]] } constructor(http) { this.http = http; } postApi() { var headers = new Headers(); headers.append('Content-Type', 'application/json'); return this.http.post('http://localhost:3001/post_test', JSON.stringify({"id": 1, "name": "2"}), { headers: headers }).toPromise(); […]