This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 3 files changed +15
-4
lines changed
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ describe('ngdoc', function() {
150
150
toMatch ( '</pre>\n\n<h1 id="one">One</h1>\n\n<pre' ) ;
151
151
} ) ;
152
152
153
+ it ( 'should replace inline variable type hints' , function ( ) {
154
+ expect ( new Doc ( ) . markdown ( '{@type string}' ) ) .
155
+ toMatch ( / < a \s + .* ?c l a s s = " .* ?t y p e - h i n t t y p e - h i n t - s t r i n g .* ?" .* ?> / ) ;
156
+ } ) ;
157
+
153
158
it ( 'should ignore nested doc widgets' , function ( ) {
154
159
expect ( new Doc ( ) . markdown (
155
160
'before<div class="tabbable">\n' +
Original file line number Diff line number Diff line change @@ -214,6 +214,10 @@ Doc.prototype = {
214
214
( title || url ) . replace ( / ^ # / g, '' ) . replace ( / \n / g, ' ' ) +
215
215
( isAngular ? '</code>' : '' ) +
216
216
'</a>' ;
217
+ } ) .
218
+ replace ( / { @ t y p e \s + ( \S + ) (?: \s + ( \S + ) ) ? } / g, function ( _ , type , url ) {
219
+ url = url || '#' ;
220
+ return '<a href="' + url + '" class="' + self . prepare_type_hint_class_name ( type ) + '">' + type + '</a>' ;
217
221
} ) ;
218
222
} ) ;
219
223
text = parts . join ( '' ) ;
Original file line number Diff line number Diff line change 11
11
*
12
12
* Special properties are exposed on the local scope of each template instance, including:
13
13
*
14
- * * `$index` – `{number}` – iterator offset of the repeated element (0..length-1)
15
- * * `$first` – `{boolean}` – true if the repeated element is first in the iterator.
16
- * * `$middle` – `{boolean}` – true if the repeated element is between the first and last in the iterator.
17
- * * `$last` – `{boolean}` – true if the repeated element is last in the iterator.
14
+ * | Variable | Type | Details |
15
+ * |===========|=================|=============================================================================|
16
+ * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |
17
+ * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |
18
+ * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |
19
+ * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |
18
20
*
19
21
* Additionally, you can also provide animations via the ngAnimate attribute to animate the **enter**,
20
22
* **leave** and **move** effects.
You can’t perform that action at this time.
0 commit comments