2015-07-28 114 views
0

我尝试在打字稿文件具有角2打字稿@ -annotation错误

使用@ -annotations中的VisualStudio但是,当我进入

import {Component, View, bootstrap, formDirectives} from "angular2/angular2"; 

@Component({ 

    selector: "tko-app" 
}) 
@View({ 
    directives: [formDirectives], 
    templateUrl: "mainapp.html" 
}); 
class MainApp 
..... 

的VisualStudio 2015年显示我的错误@意想不到的。 当删除@组件时,没有错误,我得到了组件和视图的智能感知... ...

Visual Studio代码并没有抱怨这一点。

enter image description here

+0

尝试增加'/ // '在您的文件开头 –

回答

0

的VisualStudio 2015年显示我的错误@ ......是意外

安装打字稿1.5 VS 2015年跟随工具链接:http://www.typescriptlang.org/

+0

Typescript 1.5.3已经安装(检查控制面板)。它自动附带VS 2015.我删除了缓存,修复了打印机的安装,但它仍然无法正常工作。 –

+0

它是我resharper的错......我暂时禁用了它,错误消失了。感谢Basarat –