diff options
| author | Igor Minar | 2011-02-06 21:17:58 -0800 |
|---|---|---|
| committer | Igor Minar | 2011-02-07 23:55:02 -0800 |
| commit | f3a39a6418543ac91bfce030275c205783e91e4b (patch) | |
| tree | bba593fec9ef548f80c232296bd4073a8c08150f /docs/src | |
| parent | f00b1578415ff45e5ce21de79e7bec00ab4dea51 (diff) | |
| download | angular.js-f3a39a6418543ac91bfce030275c205783e91e4b.tar.bz2 | |
docs should print usage for services that are functions
Diffstat (limited to 'docs/src')
| -rw-r--r-- | docs/src/ngdoc.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 153e6f90..9ca78dc6 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -432,9 +432,25 @@ Doc.prototype = { }, html_usage_service: function(dom){ + var self = this; dom.h('Description', this.description, dom.html); dom.h('Dependencies', this.requires); + if (this.param.length) { + dom.h('Usage', function(){ + dom.code(function(){ + dom.text(self.name.split('.').pop()); + dom.text('('); + self.parameters(dom, ', '); + dom.text(');'); + }); + + self.html_usage_parameters(dom); + self.html_usage_this(dom); + self.html_usage_returns(dom); + }); + } + dom.h('Methods', this.methods, function(method){ var signature = (method.param || []).map(property('name')); dom.h(method.shortName + '(' + signature.join(', ') + ')', method, function(){ |
