Skip to content

Commit 4bcc6b8

Browse files
committed
Added support for properties in documentation
1 parent c04530c commit 4bcc6b8

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

docs/spec/ngdocSpec.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,20 @@ describe('ngdoc', function(){
459459
expect(dom).toContain('var modelValue = angular.formatter.myFormatter.parse(userInputString, a);');
460460
});
461461
});
462+
463+
describe('property', function(){
464+
it('should format', function(){
465+
var doc = new Doc({
466+
ngdoc:'property',
467+
name:'myProp',
468+
returns:{type: 'type', description: 'description'}
469+
});
470+
doc.html_usage_property(dom);
471+
expect(dom).toContain('myProp');
472+
expect(dom).toContain('type');
473+
expect(dom).toContain('description');
474+
});
475+
});
462476
});
463477

464478
});

docs/src/ngdoc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,17 @@ Doc.prototype = {
279279
});
280280
},
281281

282+
html_usage_property: function(dom){
283+
var self = this;
284+
dom.h('Usage', function(){
285+
dom.code(function(){
286+
dom.text(self.name);
287+
});
288+
289+
self.html_usage_returns(dom);
290+
});
291+
},
292+
282293
html_usage_directive: function(dom){
283294
var self = this;
284295
dom.h('Usage', function(){

0 commit comments

Comments
 (0)