2016-09-23 33 views
0

目前工作的一個角應用,在那裏我有文件夾下的App我的應用程序特定的角度模塊的Web要點。精縮庫使用具有麻煩

使用Visual Studio擴展 - 網絡基本2012,創造了當地的角模塊和相關的文件(控制器,指令服務)一個javascript包文件到app.all.js.bundle文件下App文件夾。

結構看起來現在這個樣子:

Bundle file

現在,當我使用app.all.js到我index.html的應用程序工作正常,我,但是當改變`app.all.min.js,我得到以下錯誤:

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.5/ $injector/modulerr?p0=app&p1=Error%3A%20%…0g%20(http%3A%2F%2Flocalhost%3A59405%2FScripts%2Fangular.min.js%3A39%3A222) angular.js:38

使用app.all.min.js當我切換到angular.jsangular.min.js

我需要做什麼嗎?

回答

0

確保你正確注射依存服務和控制器。

myApp.controller('GreetingController', ['$scope', function($scope) { 
    $scope.greeting = 'Hola!'; 
}]); 
+0

已經照顧好了這些東西。 – Kenz