我在縮小時遇到了一些與着名的角度問題。如何在沒有DI錯誤的情況下縮小名片大小?
一對夫婦PRS的我昨天遞交了試圖解決這個問題,但這些似乎並沒有該問題已經解決。
當沒有minfication建成,一切都按預期工作。
當微小建的,但取消對從我的應用程序模塊「famous.angular」的依賴, 應用緩慢下降到僅有的兩個角,所以佈局borked,但潛在的角度應用正常工作,沒有錯誤。
當縮小建造,以及應用程序模塊依賴於「famous.angular」, 應用程序不會加載所有,並出現以下錯誤:
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module famous.angular due to:
Error: [$injector:unpr] Unknown provider: t
http://errors.angularjs.org/1.2.23/$injector/u...<omitted>...2)
通過採用this method, 我能以確定哪個功能沒有得到正確地精縮, 和絆倒角的依賴注入:
function LocationHashbangInHtml5Url(appBase, hashPrefix) { /* ... */ }
這是在覈心角文件 - angular.js
, ,它確實在其他情況下正確縮小。 所以我不知道爲什麼當我在應用程序模塊中包含'famous.angular'時,這會引入錯誤。
任何人都知道whaty在這裏是不對的?
演示的問題:
git clone [email protected]:bguiz/browserify-gulp-starter.git
cd browserify-gulp-starter
npm install famous
bower install --save angular angular-route famous-angular
# edit gulpoptions.js
# appName: 'app',
# appFolder: './src-famousangular/app/',
gulp serve-dist
這是否與這個職位 [這裏] [1] [1]:http://stackoverflow.com/questions/18782324/angularjs-minify-best-practice – 2014-09-03 02:53:37
@SridharChidurala是的確,它與DI有關。僅供參考,我在我的應用程序代碼上使用[ng-annotate](https://github.com/olov/ng-annotate)。 'famous.angular'似乎不需要它,因爲它的功能被適當地包裹起來。這是我無法弄清楚的。從Sridhar提供的鏈接中找到 – bguiz 2014-09-03 04:15:03
找到ng-annotate。 – 2014-09-03 04:54:12