Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Angular 2 with older browsers thanks to TypeScript?

Since the Angular 2 team is using TypeScript for it's build, would it be a feasible assumption that they could compile a version of Angular 2 that would work on older browsers?

like image 821
bkbarton Avatar asked Jun 05 '15 14:06

bkbarton


People also ask

Is TypeScript required for Angular 2?

No. TypeScript is not required to use Angular 2.

Is it mandatory to use TypeScript in Angular?

Typescript is optional, but strongly recommended.

Do all browsers support TypeScript?

TypeScript compiles to JavaScript, so it's supported by all browsers (even Internet Explorer 6).

Is Angular 2 JavaScript or TypeScript?

AngularJS is by far the most popular JavaScript framework available today for creating web applications. And now Angular 2 and TypeScript are bringing true object oriented web development to the mainstream, in a syntax that is strikingly close to Java 8.


1 Answers

Edit 2:

It appears the Angular team has decided to support some non evergreen browsers. Per Brad Green (of the Angular team): What browsers versions will Angular 2 support? There's a new build widget with some hints on https://github.com/angular/angular

Currently, the Readme shows IE9 and up.

Angular 2 will only support modern browsers:

Modern browsers means the set of browsers known as ‘evergreen’ or always automatically updated to the latest version. Building for these browsers let us drop many hacks and workarounds that make AngularJS harder to use and develop on than it needs to be.

The set currently includes Chrome, FireFox, Opera, Safari, and IE10/11. On mobile, we’ll support something close to the list of Chrome on Android, iOS 6+, Windows Phone 8+ and Firefox mobile. We’re looking into supporting older versions of Android, but the jury is still out.

http://angularjs.blogspot.com/2014/03/angular-20.html

Edit: To address your comment, no Typescript is not the limiting factor for Angular 2's lack of support for non-modern browsers (nor going to provide any magical support). Typescript can transpile to ES3, so if your target browser supports ES3, you can use Typescript. Conversely, Angular 2 will gain nothing wrt supporting legacy browsers by using TypeScript.

like image 149
Noel Avatar answered Sep 21 '22 13:09

Noel