Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #125 from jerico-dev/fix-ngdoc-location-provider
Browse files Browse the repository at this point in the history
add missing method to ngdoc location provider
  • Loading branch information
m7r committed Nov 26, 2014
2 parents 403bd78 + 9a9de1f commit ae91d23
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/templates/js/angular-bootstrap-prettify.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ directive.ngEvalJavascript = ['getEmbeddedTemplate', function(getEmbeddedTemplat
}];


directive.ngEmbedApp = ['$templateCache', '$browser', '$rootScope', '$location', '$sniffer', '$animate',
function($templateCache, $browser, docsRootScope, $location, $sniffer, $animate) {
directive.ngEmbedApp = ['$templateCache', '$browser', '$rootScope', '$location', '$sniffer', '$animate', '$exceptionHandler',
function($templateCache, $browser, docsRootScope, $location, $sniffer, $animate, $exceptionHandler) {
return {
terminal: true,
link: function(scope, element, attrs) {
Expand All @@ -214,14 +214,29 @@ directive.ngEmbedApp = ['$templateCache', '$browser', '$rootScope', '$location',
return $location;
}];
this.html5Mode = angular.noop;
this.hashPrefix = function () {
return '';
};
});

$provide.decorator('$rootScope', ['$delegate', function($delegate) {
embedRootScope = $delegate;

// Since we are teleporting the $animate service, which relies on the $$postDigestQueue
// we need the embedded scope to use the same $$postDigestQueue as the outer scope
embedRootScope.$$postDigestQueue = docsRootScope.$$postDigestQueue;
function docsRootDigest() {
var postDigestQueue = docsRootScope.$$postDigestQueue;
while (postDigestQueue.length) {
try {
postDigestQueue.shift()();
} catch (e) {
$exceptionHandler(e);
}
}
}
embedRootScope.$watch(function () {
embedRootScope.$$postDigest(docsRootDigest);
})

deregisterEmbedRootScope = docsRootScope.$watch(function embedRootScopeDigestWatch() {
embedRootScope.$digest();
Expand Down

0 comments on commit ae91d23

Please sign in to comment.