grunt-ngdocs:样式文件未包含在演示代码中
grunt-ngdocs: styles file not included to demo code
我正在使用 grunt-ngdocs
来记录我的 Angular 项目。但是演示 Plunker 代码(自动生成)不包含 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 页面上,该演示运行良好。但是链接到 Plunker 不会产生预期的结果,因为 CSS 包含行不存在。有什么建议吗?
使用临时解决方案。在 javascript 文件 @example
部分 内 添加以下行:
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.7/semantic.css">
我正在使用 grunt-ngdocs
来记录我的 Angular 项目。但是演示 Plunker 代码(自动生成)不包含 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 页面上,该演示运行良好。但是链接到 Plunker 不会产生预期的结果,因为 CSS 包含行不存在。有什么建议吗?
使用临时解决方案。在 javascript 文件 @example
部分 内 添加以下行:
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.7/semantic.css">