Exploring the capabilities of AngularJS 2.0 in my own version of Reddit, I've put together a script called app.ts
///<reference path="typings/angular2/angular2.d.ts" />
import {
Component,
View,
bootstrap,
} from "angular2/angular2";
@Component({
selector: 'hello world'
})
@View(
{ template: `<div>HelloWorld</div>` })
class HelloWorld {
}
bootstrap(HelloWorld)
However, when trying to compile this into a javascript (js) file using tsc app.ts, I encounter several errors displayed on the command line.
I have installed tsc through npm install -g 'typescript@^1.5.0-beta' and ran npm install as well. The errors point to issues like:
C:\angular2-reddit\typings\angular2\angular2.d.ts(7,22): error TS1005: ')' expec
ted.
C:\angular2-reddit\typings\angular2\angular2.d.ts(14,6): error TS1008: Unexpecte
d token; 'module, class, interface, enum, import or statement' expected.
If anyone has insights on where I might have gone wrong, I would appreciate your help!
Thank you...