aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/templates/doc_widgets.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/templates/doc_widgets.js')
-rw-r--r--docs/src/templates/doc_widgets.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/src/templates/doc_widgets.js b/docs/src/templates/doc_widgets.js
index bee59234..76ccac7f 100644
--- a/docs/src/templates/doc_widgets.js
+++ b/docs/src/templates/doc_widgets.js
@@ -27,7 +27,7 @@ angular.module('ngdocs.directives', [], function($compileProvider) {
return {
terminal: true,
compile: function(element, attrs) {
- var module = element.attr('module') || '';
+ var module = attrs.module;
//jQuery find() methods in this widget contain primitive selectors on purpose so that we can use
//jqlite instead. jqlite's find() method currently supports onlt getElementsByTagName!
@@ -86,6 +86,17 @@ angular.module('ngdocs.directives', [], function($compileProvider) {
function($provide) {
$provide.value('$browser', $browser);
$provide.value('$location', $location);
+ $provide.decorator('$defer', function($rootScope, $delegate) {
+ return angular.extend(function(fn, delay) {
+ if (delay && delay > 500) {
+ return setTimeout(function() {
+ $rootScope.$apply(fn);
+ }, delay);
+ } else {
+ return $delegate.apply(this, arguments);
+ }
+ }, $delegate);
+ });
}
];
module && modules.push(module);