Trying to get the angular v3 router example to work. http://plnkr.co/edit/ER0tf8fpGHZiuVWB7Q07?p=preview
http://plnkr.co/edit/ER0tf8fpGHZiuVWB7Q07?p=preview
My package.json is below, but when I run npm run tsc, I get errors...
app/crisis-center/crisis-center.routes.ts(14,5): error TS2322: Type '{ path: string; component: typeof CrisisCenterComponent; index: boolean; children: ({ path: strin...' is not assignable to type 'Route[]'.
Type '{ path: string; component: typeof CrisisCenterComponent; index: boolean; children: ({ path: strin...' is not assignable to type 'Route'. Object literal may only specify known properties, and 'index' does not exist in type 'Route'.
app/crisis-center/crisis-detail.component.ts(46,17): error TS7006: Parameter 'crisis' implicitly has an 'any' type.
app/crisis-center/crisis-detail.component.ts(81,12): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable | boolean'. Type 'Observable<{}>' is not assignable to type 'boolean'.
app/crisis-center/crisis-list.component.ts(35,17): error TS7006: Parameter 'crises' implicitly has an 'any' type.
app/crisis-center/crisis.service.ts(12,21): error TS2304: Cannot find name 'Promise'."
Package.json
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},
"license": "ISC",
"dependencies": {
"@angular/common": "2.0.0-rc.2",
"@angular/compiler": "2.0.0-rc.2",
"@angular/core": "2.0.0-rc.2",
"@angular/http": "2.0.0-rc.2",
"@angular/platform-browser": "2.0.0-rc.2",
"@angular/platform-browser-dynamic": "2.0.0-rc.2",
"@angular/router": "^3.0.0-alpha.7",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.2",
"systemjs": "0.19.27",
"core-js": "^2.4.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",
"angular2-in-memory-web-api": "0.0.12",
"bootstrap": "^3.3.6"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.2.0",
"typescript": "^1.9.0-dev.20160409",
"typings":"^1.0.4"
}
}