Here is my first simple Hello World angular 2 app from Angular 2 quick start guide .
import {Component} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; @Component({ selector: 'ng2-app', template: '<h1>My first Angular 2 App</h1>' }) export class AppComponent { } bootstrap(AppComponent);
The application works fine when I start with npm start , but my IntelliJ IDE shows an error in the line with bootstrap(AppComponent)
The argument type of the AppComponent is not assigned to the parameter type. Type

Looking at the bootstrap function declaration, AppComponent needs to extend Type .
export declare function bootstrap(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef>;
My question is:
Are angular components expected to have a Type extension?
javascript intellij-idea angular typescript
TheKojuEffect Dec 19 '15 at 2:59 2015-12-19 02:59
source share