app.ts (1,12):...">

Compilation error 5 MIN QUICKSTART Angular 2.0

When adding lines -

<reference path="typings/angular2/angular2.d.ts" >

      

app.ts (1,12): error TS1005: '>' expected.

app.ts (1,16): error TS1005: ';' expected.

app.ts (2,1): error TS1109: expected expression.

+3


source to share


1 answer


To import a type definition into TypeScript, you first need to have a forward slash ( ///

) at the beginning and attach the reference tag with a forward slash ( />

).

/// <reference path="typings/angular2/angular2.d.ts" />

      



For more examples take a look at http://www.typescriptlang.org/Handbook#modules-splitting-across-files

+2


source







All Articles