简体   繁体   English

带有Angular 2的ASP.NET Core(cli init)不起作用

[英]ASP.NET Core with Angular 2 (cli init) doesn't work

I`m do creating Empty ASP.NET Core project. 我正在创建空的 ASP.NET核心项目。 In folder wwwroot i run ng init via cmd. wwwroot文件夹中,我通过cmd运行init After restoring packages i host my ASP project on Kestrel . 恢复包后,我在Kestrel上托管我的ASP项目。 Compiler output project compile-time errors Errors in files of *.aspx.cs in the wwwroot\\node_modules\\protractor\\node_modules\\selenium-webdriver\\lib\\test\\data folder. 编译器输出项目编译时错误wwwroot \\ node_modules \\ protractor \\ node_modules \\ selenium-webdriver \\ lib \\ test \\ data文件夹中* .aspx.cs文件中的错误。

How to delete this [protractor, selenium, webdriver] what there would be no errors any more OR/AND to deliver restriction to the compiler on the wwwroot folder? 如何删除这个[量角器,selenium,webdriver]什么不会有任何错误OR / AND在wwwroot文件夹上对编译器提供限制?

Thx! 谢谢!

Selenium Webdriver doesn't work with ASP.NET Core. Selenium Webdriver不适用于ASP.NET Core。 Try using this sample: 尝试使用此示例:

package.json 的package.json

{
"name": "angular",
"version": "1.0.0",
"description": "Angular 2, ASP.NET Core, Visual Studio 2017 RC",
"scripts": {
"postinstall": "gulp restore"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
"@angular/core": "~2.2.0",
"@angular/forms": "~2.2.0",
"@angular/http": "~2.2.0",
"@angular/platform-browser": "~2.2.0",
"@angular/platform-browser-dynamic": "~2.2.0",
"@angular/router": "~3.2.0",

"angular-in-memory-web-api": "0.2.4",
"systemjs": "0.19.41",
"core-js": "2.4.1",
"reflect-metadata": "0.1.9",
"rxjs": "5.0.3",
"zone.js": "0.7.4"
},
"devDependencies": {
"typescript": "^2.1.4",
"gulp": "^3.9.1",
"@types/node": "^6.0.46",
"@types/jasmine": "^2.5.36"
},
"repository": {}
}

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

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