IntelliJ 中的 Angular2(v15 - Ultimate 的最新更新)应该可以工作吗?所有文档似乎都说它是通过 AngularJS 插件实现的,但我遇到了非常奇怪的智能感知错误。例如;
bootstrap(App, [
ROUTER_PROVIDERS,
provide(LocationStrategy, {useClass: HashLocationStrategy})
]);
投掷 Argument type App is not assignable to parameter type Type
和标准注释,如;
@RouteConfig([
{path: '/...', component: RootView, as: 'RootView', useAsDefault: true}
])
扔Argument type {path: string, component: RootView, as: string, useAsDefault: boolean}[] is not assignable to parameter type RouteDefinition[]
有没有人遇到过这个?有人知道如何让 IntelliJ 玩得更好吗?
根据要求提供应用程序的来源;
import {Component, ViewEncapsulation} from 'angular2/core';
import {RootView} from './root-view';
import {
RouteConfig,
ROUTER_DIRECTIVES
} from 'angular2/router';
@Component({
selector: 'app',
templateUrl: './components/app/app.html',
encapsulation: ViewEncapsulation.None,
directives: [ROUTER_DIRECTIVES]
})
@RouteConfig([
{path: '/...', component: RootView, as: 'RootView', useAsDefault: true}
])
export class App {
}