Intellij idea 关于IntelliJ的Angular 2代码建议
我看到Angular2 RC在本月早些时候发布,我已经玩了几个月的测试版,所以我决定用Intellij idea 关于IntelliJ的Angular 2代码建议,intellij-idea,autocomplete,typescript,angular,Intellij Idea,Autocomplete,Typescript,Angular,我看到Angular2 RC在本月早些时候发布,我已经玩了几个月的测试版,所以我决定用 npm uninstall angular2 然后,我使用angular2快速入门教程中的package.json安装RC版本: { "name": "angular2-quickstart", "version": "1.0.0", "scripts": { "start": "tsc && concurrently \"npm run tsc:w\" \"npm ru
npm uninstall angular2
然后,我使用angular2快速入门教程中的package.json安装RC版本:
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},
"license": "ISC",
"dependencies": {
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/router": "2.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.1",
"@angular/upgrade": "2.0.0-rc.1",
"systemjs": "0.19.27",
"es6-shim": "^0.35.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",
"angular2-in-memory-web-api": "0.0.7",
"bootstrap": "^3.3.6"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.2.0",
"typescript": "^1.8.10",
"typings":"^0.8.1"
}
}
在一些导入重写之后,我的应用程序运行良好,但现在,我的IDE上的angular框架不再具有自动完成功能
例如,IntelliJ无法识别模板中的*ngIf指令
这是我的tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
]
}
我是否需要配置其他东西以使其再次工作
感谢您的回答根据a,2016.1.2 EAP解决了这个问题。我更新至2016.1.3 EAP,或更具体地说:
IntelliJ IDEA (Minerva) IU-145.1503.17
Build #IU-145.1503, built on May 20, 2016
它为我解决了这个问题。我建议使用Jetbrains以web为中心的IDE WebStorm。它对Angular 2有现成的支持,甚至有一个运行npm脚本的奇特界面 你可以试试
下面是使用示例:plnkr.co/edit/5zRD0fcOZHXEMOk4kupY?p=preview您真的在使用intellij-14,还是这是一个错误的标记?如果你是的话,我对ng2的支持不会有太大的期望——这仍然是最前沿(2016.x)版本的一部分。我推荐WebStorm用于Angular2的开发。它来自与IntelliJ相同的开发人员,但WebStorm支持Angular2+Typescript。@Patrick2607-IntelliJ是所有Jetbrains IDE的超集。i、 e.WebStorm、Pycharm等的全部功能可以通过插件整合到IntelliJ中。angular已更新,让我们等待webstrom更新它甚至不允许*ngFor,(submit),等等。在这里找到答案我认为作者希望在前端web代码/浏览器中没有IDE的情况下自动完成:-/