我想通过使用angular-translate-loader-partial插件
来拆分我的json翻译文件bower install angular-translate-loader-partial
不会在我的index.html中对.js文件进行wiredep(即使使用--save-dev) 所以我手动实现了它
<!-- build:js(.) scripts/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-touch/angular-touch.js"></script>
<script src="bower_components/swiper/dist/idangerous.swiper.js"></script>
<script src="bower_components/angular-translate/angular-translate.js"></script>
<!-- endbower -->
<!-- endbuild -->
<script src="bower_components/angular-translate-loader-partial/angular-translate-loader-partial.js"></script>
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/app.js"></script>
<script src="scripts/controllers/main.js"></script>
<script src="scripts/controllers/about.js"></script>
<script src="scripts/controllers/menu.js"></script>
<script src="scripts/controllers/shareform.js"></script>
<!-- endbuild -->
在实时视图中它确实有效,但如果我做“咕噜咕噜”,它就不再起作用了 可能它不是构建的一部分
答案 0 :(得分:0)
你需要把它放在你的bower.json中dependencies
下。供将来参考使用--save
标志表示依赖项,--save-dev
表示devDependencies。