mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-24 10:20:23 +00:00
Added support for properties in documentation
This commit is contained in:
parent
8cad231bd2
commit
f9f95879f0
2 changed files with 25 additions and 0 deletions
|
|
@ -543,6 +543,20 @@ describe('ngdoc', function(){
|
|||
expect(dom).toContain('var modelValue = angular.formatter.myFormatter.parse(userInputString, a);');
|
||||
});
|
||||
});
|
||||
|
||||
describe('property', function(){
|
||||
it('should format', function(){
|
||||
var doc = new Doc({
|
||||
ngdoc:'property',
|
||||
name:'myProp',
|
||||
returns:{type: 'type', description: 'description'}
|
||||
});
|
||||
doc.html_usage_property(dom);
|
||||
expect(dom).toContain('myProp');
|
||||
expect(dom).toContain('type');
|
||||
expect(dom).toContain('description');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -321,6 +321,17 @@ Doc.prototype = {
|
|||
});
|
||||
},
|
||||
|
||||
html_usage_property: function(dom){
|
||||
var self = this;
|
||||
dom.h('Usage', function(){
|
||||
dom.code(function(){
|
||||
dom.text(self.name);
|
||||
});
|
||||
|
||||
self.html_usage_returns(dom);
|
||||
});
|
||||
},
|
||||
|
||||
html_usage_directive: function(dom){
|
||||
var self = this;
|
||||
dom.h('Usage', function(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue