mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs: add services, utilities
This commit is contained in:
@@ -18,5 +18,8 @@ module.exports = [
|
||||
},
|
||||
{
|
||||
name: 'codepen'
|
||||
},
|
||||
{
|
||||
name: 'alias'
|
||||
}
|
||||
];
|
||||
|
||||
31
docs/templates/api/api.template.html
vendored
31
docs/templates/api/api.template.html
vendored
@@ -3,22 +3,23 @@
|
||||
<@ block content @>
|
||||
|
||||
<@ block header @>
|
||||
<@ if doc.docType == "directive" @>
|
||||
<h2><$ doc.name | dashCase $>
|
||||
<@ if doc.parent @>
|
||||
<small>
|
||||
(child of <$ doc.parent $>)
|
||||
</small>
|
||||
<@ endif @>
|
||||
<@ if doc.controller @>
|
||||
<small>
|
||||
(controller: <$ doc.controller $>)
|
||||
</small>
|
||||
<@ endif @>
|
||||
<h2>
|
||||
<@ if doc.docType == "directive" @>
|
||||
<$ doc.name | dashCase $>
|
||||
<@ else @>
|
||||
<$ doc.name $>
|
||||
<@ endif @>
|
||||
<@ if doc.parent @>
|
||||
<small>
|
||||
(child of <$ doc.parent $>)
|
||||
</small>
|
||||
<@ endif @>
|
||||
<@ if doc.controller @>
|
||||
<small>
|
||||
(controller: <$ doc.controller $>)
|
||||
</small>
|
||||
<@ endif @>
|
||||
</h2>
|
||||
<@ else @>
|
||||
## <$ doc.name $>
|
||||
<@ endif @>
|
||||
|
||||
<@ if doc.codepen @>
|
||||
{% include codepen.html id="<$ doc.codepen $>" %}
|
||||
|
||||
4
docs/templates/api/directive.template.html
vendored
4
docs/templates/api/directive.template.html
vendored
@@ -46,12 +46,10 @@
|
||||
<@- endif @>
|
||||
<@ endblock -@>
|
||||
|
||||
<h2 id="api" style="clear:both;">API</h2>
|
||||
|
||||
<@ if doc.params @>
|
||||
<h2 id="api" style="clear:both;">API</h2>
|
||||
<$ paramTable(doc.params, true) $>
|
||||
<@ else @>
|
||||
No options available.
|
||||
<@ endif @>
|
||||
|
||||
<@ include "lib/events.template.html" @>
|
||||
|
||||
9
docs/templates/api/utility.template.html
vendored
Normal file
9
docs/templates/api/utility.template.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<@ extends "api/object.template.html" @>
|
||||
|
||||
<@ block related_components @>
|
||||
<@ if doc.providerDoc -@>
|
||||
<li>
|
||||
<a href="<$ doc.providerDoc.path $>">- <$ doc.providerDoc.name $></a>
|
||||
</li>
|
||||
<@- endif @>
|
||||
<@ endblock @>
|
||||
12
docs/templates/lib/macros.html
vendored
12
docs/templates/lib/macros.html
vendored
@@ -4,7 +4,7 @@
|
||||
<@- endmacro -@>
|
||||
|
||||
<@ macro paramTable(params, isDirective) @>
|
||||
<table class="table">
|
||||
<table class="table" style="margin:0;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><@ if isDirective @>Attr<@ else @>Param<@ endif @></th>
|
||||
@@ -42,11 +42,11 @@
|
||||
|
||||
<@- macro functionSyntax(fn) @>
|
||||
<@- set sep = joiner(', ') -@>
|
||||
`<$ fn.name $>(<@- for param in fn.params @><$ sep() $>
|
||||
<@- if param.type.optional @>[<@ endif -@>
|
||||
<$ param.name $>
|
||||
<@- if param.type.optional @>]<@ endif -@>
|
||||
<@ endfor @>)`
|
||||
<code><$ fn.name $>(<@- for param in fn.params @><$ sep() $>
|
||||
<@- if param.type.optional @>[<@ endif -@>
|
||||
<$ param.name $>
|
||||
<@- if param.type.optional @>]<@ endif -@>
|
||||
<@ endfor @>)</code><@ if fn.alias @><small>(alias: <$ fn.alias $>)</small><@ endif @>
|
||||
<@ endmacro -@>
|
||||
|
||||
<@- macro typeInfo(fn) -@>
|
||||
|
||||
4
docs/templates/lib/methods.template.html
vendored
4
docs/templates/lib/methods.template.html
vendored
@@ -3,7 +3,9 @@
|
||||
<@- for method in doc.methods @>
|
||||
|
||||
<div id="<$ method.name $>"></div>
|
||||
### <$ functionSyntax(method) $>
|
||||
<h2>
|
||||
<$ functionSyntax(method) $>
|
||||
</h2>
|
||||
|
||||
<$ method.description $>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user