如何制作你的角度加载bootstrap主题css
发布时间:2020-12-17 20:39:31 所属栏目:安全 来源:网络整理
导读:你的角度安装bootstrap文件都很好. index.html文件目前看起来像这样: !-- Place favicon.ico and apple-touch-icon.png in the root directory --!-- build:css(.) styles/vendor.css --!-- bower:css --link rel="stylesheet" href="bower_components/boot
你的角度安装bootstrap文件都很好. index.html文件目前看起来像这样:
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- build:css(.) styles/vendor.css --> <!-- bower:css --> <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /> <!-- endbower --> <!-- endbuild --> <!-- build:css(.tmp) styles/main.css --> <link rel="stylesheet" href="styles/main.css"> <!-- endbuild --> 这不包括bootstrap.theme.css文件. 建议添加此方法的方法是什么?我手动进去并添加吗? 解决方法
正确的方法是覆盖你的bower.json文件来加载bootstrap依赖项,然后运行grunt wiredep
bower.json看起来像这样: { "name": "frontend","version": "0.0.0","dependencies": { "angular": "^1.3.0","json3": "^3.3.0","es5-shim": "^4.0.0","bootstrap": "^3.2.0","angular-cookies": "^1.3.0","angular-route": "^1.3.0","angular-local-storage": "~0.1.5","raty": "~2.7.0","kineticjs": "~5.1.0" },"devDependencies": { "angular-mocks": "~1.3.0","angular-scenario": "~1.3.0" },"appPath": "app","overrides": { "bootstrap": { "main": [ "less/bootstrap.less","dist/css/bootstrap.css","dist/css/bootstrap-theme.css","dist/js/bootstrap.js","dist/fonts/glyphicons-halflings-regular.eot","dist/fonts/glyphicons-halflings-regular.svg","dist/fonts/glyphicons-halflings-regular.ttf","dist/fonts/glyphicons-halflings-regular.woff" ] } } } 资料来源:https://github.com/yeoman/generator-angular/issues/965#issuecomment-68548259 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |