我正在使用grunt-ngdocs来记录我的角度项目。但是演示柱塞代码(自动生成)不包括CSS文件。
我在Gruntfile.js中的配置包括:
...
scripts: [
'https://code.jquery.com/jquery-2.1.4.js'
],
styles: [
'https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.7/semantic.css'
]
...在我的JS src文件中:
@example
<example module="sui.checkbox">
<file name="index.html">
...
</file>
<example>在API页面上,JS和CSS文件被正确加载。但是,显示的demo源代码不包括CSS文件:
<!doctype html>
<html ng-app="sui.checkbox">
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="app.js"></script>
<!-- semantic.css should be imported here -->
</head>
<body>
...
</body>
</html>在我的API页面上,演示工作得很好。但是链接到柱塞并不会产生想要的结果,因为CSS包括行并不存在。有什么建议吗?
发布于 2015-07-31 15:05:05
使用临时解决方案。在javascript文件部分的中添加以下行@example:
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.7/semantic.css">https://stackoverflow.com/questions/31719426
复制相似问题