2017-02-06 6 views
1

空想的なes6 /モジュールのもので新しいプロジェクトを開始しようとしています。私が入れた場合、私は...とにかく、私は実際に私の基本セットアップを実行しようとしていると私は理解できないことはAngular templatecacheからテンプレートを読み込めません。役に立たないエラー

Error: [$compile:tpload] Failed to load template: components/unauthenticated-container/unauthenticated-container.component.html (HTTP status: undefined undefined) 
http://errors.angularjs.org/1.6.1/$compile/tpload?p0=components%2Funauthent…ainer%2Funauthenticated-container.component.html&p1=undefined&p2=undefined 
    at angular.js:68 
    at l (angular.js:19730) 
    at s (angular.js:16648) 
    at angular.js:16692 
    at d.$eval (angular.js:17972) 
    at d.$digest (angular.js:17786) 
    at d.$apply (angular.js:18080) 
    at angular.js:1841 
    at Object.a [as invoke] (angular.js:4842) 
    at a (angular.js:1839) 

でその等をゴクゴク、ngAnnotate、browserify、角度-templatecacheを、使用していますブレークポイントは$templateRequestで、$templateCacheには私が取得しようとしているテンプレートが含まれています。私はすることができます

$templateCache.get('components/unauthenticated-container/unauthenticated-container.component.html'); 

私は期待しているテンプレートを取得します。私は上記のエラーから(HTTP status: undefined undefined)が本当にどういう意味なのか分かりません。 templateCacheを作成するために生成されたファイルが正しく表示されます:

angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("components/authenticated-container/authenticated-container.component.html","<div>Authenticated</div>\n"); 
$templateCache.put("components/unauthenticated-container/unauthenticated-container.component.html","<div>\n <div ui-view></div>\n</div>\n");}]); 

私は行方不明または何かを試すことができますか?

答えて

2

私の傍受者の1人にエラーがありましたが、$ httpはエラーを起こしていませんでした。

+0

私の場合のエラーは、$ injectorが依存関係を解決できないためです –

関連する問題