简体   繁体   中英

How can Angular support Internet Explorer 9?

Recently, Angular team announced that they'll support Internet Explorer 9 and I wonder how it possible?

I use AngularJS at the moment so I read a lot about Angular and try to practice a little. I was pretty sure that Angular can be more faster than AngularJS because it use new feature of EcmaScript 6 and new events. As far as i know, Internet Explorer doesn't provide this events and features at all.

So, where is the trick? How Angular can support IE9 without this new features? I know TypeScript can compile in ES3. But it can't add new features like new DOM events.

You have to include angular2-polyfills.js ( or angular2-polyfills.min.js ) in your code for Angular 2 project. ( current version Angular 2.0.1 beta )

That library adds missing polyfills to the browsers.

a polyfill (or polyfiller) is additional code which provides facilities that are not built into a web browser. ... https://en.wikipedia.org/wiki/Polyfill

They use something called es6 shim which basically adds es6 features to browsers that haven't implemented them yet.

However using es6 syntax is far from being the reason to why angular 2 is faster. The main reasons why Angular 2 is faster than 1 is because of the way the check for changes in the model (which checks less often), they removed features that are not too performant and because instead of using the DOM directly they use something called Virtual DOM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM