What is the purpose of these angular2 imports?

I am new to angular2 and want to know the purpose of the following import operations that we do in our angular2 application.

<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="node_modules/angular2/bundles/http.dev.js"></script>

so my questions regarding these imports are:

  • What are these imported goods for?
  • Does the sequence of these import measurements take?
  • Are there any other useful imports we should be aware of?

Thanks in advance.

+1
source share
2 answers

The following is information about what you specified in your script elements:

  • The first two files are not needed if you are using TypeScript and have configured ES5 output.
  • angular2 -polyfills.js - ZoneJS ( - . Angular2, AngularJS $?) ( )
  • system.src.js - SystemJS, , . , TypeScript, .
  • Rx.js - RxJS, , . , Arion . EventEmitters, HTTP .
  • angular2.dev.js - Angular2 core bundle
  • http.dev.js - HTTP Angular2
+1

. -. :

  • es6-shim.min.js - ES6 ( )
  • Rx.js Observables (GitHub RxJS)
  • http.dev.js - angular2 $http

, Google , .

imports ES2015/ES6 https://ponyfoo.com/articles/es6-modules-in-depth .

" , ?

. , angular2.dev.js http.dev.js .

" ?"

, , , . (system.js/require.js) .

+3

All Articles