2016-05-20 16 views
1

最近、私のng2アプリをbeta2.0.12からrc.0.1にアップグレードしました。以前私はindex.htmlに次のようなインポートを行っていました:index.html angular2 rc.0.1のインポート

<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/es6/dev/src/testing/shims_for_IE.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/router.dev.js"></script> 
<script src="node_modules/angular2/bundles/http.dev.js"></script> 

rc.0.1に対応するインポートは何ですか?任意のポインタを気に入ってください。

おかげ

+4

[クイックスタートガイドはrc1の使い方の良い例です](https://angular.io/docs/ts/latest/quickstart.html) – nu11p01n73R

答えて

2

いい質問まず、私はあまりにもRC.0で輸入についての混乱が、私は私の答えを見られるよりも、angular2すべて輸入のRC.0で実際に

system.config.jsで言及されていますファイルは、このファイルで 見て慎重にあなたがRC.0にので、ここでこれらfile.allのindex.htmlに角度のangular.dev/router/httpファイルをインポートする必要が

(function (global) { 

    var map = { 
    ... 
    '@angular': 'node_modules/@angular' // here angular2 bind all the imports of @angular from the node_modules folder itself 
              instead of importing in the index.html 
    ... 
    }; 

    var packageNames = [ 
    '@angular/common',  //Here all the imports bind by name like from core/common and all... 
    '@angular/compiler', 
    '@angular/core', 
    '@angular/http', 
    '@angular/platform-browser', 
    '@angular/platform-browser-dynamic', 
    // '@angular/router', 
    '@angular/router-deprecated', 
    '@angular/testing', 
    '@angular/upgrade', 
    ]; 

})(this); 

をすべての輸入を見ないだろうよりインポートがsystem.config.jsファイル経由でインポートされました。

関連する問題