@@ -157,7 +157,11 @@ Doc.prototype = {
157
157
description : self . markdown ( text . replace ( match [ 0 ] , match [ 2 ] ) )
158
158
} ;
159
159
} else if ( atName == 'requires' ) {
160
- self . requires . push ( text ) ;
160
+ var match = text . match ( / ^ ( [ ^ \s ] * ) \s * ( [ \S \s ] * ) / ) ;
161
+ self . requires . push ( {
162
+ name : match [ 1 ] ,
163
+ text : self . markdown ( match [ 2 ] )
164
+ } ) ;
161
165
} else if ( atName == 'property' ) {
162
166
var match = text . match ( / ^ { ( \S + ) } \s + ( \S + ) ( \s + ( .* ) ) ? / ) ;
163
167
if ( ! match ) {
@@ -185,6 +189,16 @@ Doc.prototype = {
185
189
'This page is currently being revised. It might be incomplete or contain inaccuracies.' ) ;
186
190
notice ( 'deprecated' , 'Deprecated API' , self . deprecated ) ;
187
191
192
+ if ( self . ngdoc != 'overview' ) {
193
+ dom . h ( 'Description' , self . description , dom . html ) ;
194
+ }
195
+ dom . h ( 'Dependencies' , self . requires , function ( require ) {
196
+ dom . tag ( 'code' , function ( ) {
197
+ dom . tag ( 'a' , { href :"#!angular.service." + require . name } , require . name ) ;
198
+ } ) ;
199
+ dom . html ( require . text ) ;
200
+ } ) ;
201
+
188
202
( self [ 'html_usage_' + self . ngdoc ] || function ( ) {
189
203
throw new Error ( "Don't know how to format @ngdoc: " + self . ngdoc ) ;
190
204
} ) . call ( self , dom ) ;
@@ -251,8 +265,6 @@ Doc.prototype = {
251
265
252
266
html_usage_function : function ( dom ) {
253
267
var self = this ;
254
- dom . h ( 'Description' , self . description , dom . html ) ;
255
- dom . h ( 'Dependencies' , self . requires ) ;
256
268
dom . h ( 'Usage' , function ( ) {
257
269
dom . code ( function ( ) {
258
270
dom . text ( self . name ) ;
@@ -269,8 +281,6 @@ Doc.prototype = {
269
281
270
282
html_usage_directive : function ( dom ) {
271
283
var self = this ;
272
- dom . h ( 'Description' , self . description , dom . html ) ;
273
- dom . h ( 'Dependencies' , self . requires ) ;
274
284
dom . h ( 'Usage' , function ( ) {
275
285
dom . tag ( 'pre' , { 'class' :"brush: js; html-script: true;" } , function ( ) {
276
286
dom . text ( '<' + self . element + ' ' ) ;
@@ -287,8 +297,6 @@ Doc.prototype = {
287
297
288
298
html_usage_filter : function ( dom ) {
289
299
var self = this ;
290
- dom . h ( 'Description' , self . description , dom . html ) ;
291
- dom . h ( 'Dependencies' , self . requires ) ;
292
300
dom . h ( 'Usage' , function ( ) {
293
301
dom . h ( 'In HTML Template Binding' , function ( ) {
294
302
dom . tag ( 'code' , function ( ) {
@@ -319,8 +327,6 @@ Doc.prototype = {
319
327
320
328
html_usage_formatter : function ( dom ) {
321
329
var self = this ;
322
- dom . h ( 'Description' , self . description , dom . html ) ;
323
- dom . h ( 'Dependencies' , self . requires ) ;
324
330
dom . h ( 'Usage' , function ( ) {
325
331
dom . h ( 'In HTML Template Binding' , function ( ) {
326
332
dom . code ( function ( ) {
@@ -359,8 +365,6 @@ Doc.prototype = {
359
365
360
366
html_usage_validator : function ( dom ) {
361
367
var self = this ;
362
- dom . h ( 'Description' , self . description , dom . html ) ;
363
- dom . h ( 'Dependencies' , self . requires ) ;
364
368
dom . h ( 'Usage' , function ( ) {
365
369
dom . h ( 'In HTML Template Binding' , function ( ) {
366
370
dom . code ( function ( ) {
@@ -389,8 +393,6 @@ Doc.prototype = {
389
393
390
394
html_usage_widget : function ( dom ) {
391
395
var self = this ;
392
- dom . h ( 'Description' , self . description , dom . html ) ;
393
- dom . h ( 'Dependencies' , self . requires ) ;
394
396
dom . h ( 'Usage' , function ( ) {
395
397
dom . h ( 'In HTML Template Binding' , function ( ) {
396
398
dom . code ( function ( ) {
@@ -435,8 +437,6 @@ Doc.prototype = {
435
437
436
438
html_usage_service : function ( dom ) {
437
439
var self = this ;
438
- dom . h ( 'Description' , this . description , dom . html ) ;
439
- dom . h ( 'Dependencies' , this . requires ) ;
440
440
441
441
if ( this . param . length ) {
442
442
dom . h ( 'Usage' , function ( ) {
0 commit comments