Raihan Iqbal
Raihan Iqbal

Reputation: 407

Typescript 2.2 and Angular 2.0.0-beta.21 dont go well together?

I followed the handbook guide for ASP.Net 4 but when I run the project I get the following console error

Error: declare.call is not a function
  Instantiating http://localhost:29961/Home/angular2/platform/browser
  Loading http://localhost:29961/Scripts/App/main.js
  Loading /Scripts/App/main
    at registerDeclarative (system.src.js:812)
    at system.src.js:714
    at ZoneDelegate.invoke (angular2-polyfills.js:349)
    at Zone.run (angular2-polyfills.js:242)
    at angular2-polyfills.js:597
    at ZoneDelegate.invokeTask (angular2-polyfills.js:382)
    at Zone.runTask (angular2-polyfills.js:282)
    at drainMicroTaskQueue (angular2-polyfills.js:500)

My package.json looks like this

{
  "name": "myproject",
  "version": "1.0.0",
  "devDependencies": {
    "angular2": "^2.0.0-beta.21",
    "rxjs": "^5.2.0",
    "systemjs": "^0.20.11",
    "typings": "^2.1.0",
    "zone.js": "^0.8.5"
  }
}

May be the guide was written for an older version of Angular2 and Typescript. So I might need to downgrade?

Upvotes: 0

Views: 150

Answers (1)

Ján Halaša
Ján Halaša

Reputation: 8421

TypeScript > 2.0 is supported just in Angular 4.0 You can check the changelog: https://github.com/angular/angular/blob/master/CHANGELOG.md

Angular 2.0.0-beta is rather old now, you could consider upgrading it to a newer version. There have been some functional changes, so the current Angular documentation may not work with a beta version.

Upvotes: 1

Related Questions