From 4aa4005f5fe83f7c3d3343980840c79b5b70179b Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Tue, 23 Sep 2014 19:26:04 +0100 Subject: [PATCH] chore(docs): AngularJS 1.2.x doesn't support '$includeContentError' event --- docs/app/src/docs.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/app/src/docs.js b/docs/app/src/docs.js index abe2b3122..7ba11eddf 100644 --- a/docs/app/src/docs.js +++ b/docs/app/src/docs.js @@ -24,20 +24,14 @@ angular.module('DocsController', []) $window._gaq.push(['_trackPageview', pagePath]); }); - $scope.$on('$includeContentError', function() { - $scope.partialPath = 'Error404.html'; - }); - - $scope.$watch(function docsPathWatch() {return $location.path(); }, function docsPathWatchAction(path) { path = path.replace(/^\/?(.+?)(\/index)?\/?$/, '$1'); - $scope.partialPath = 'partials/' + path + '.html'; - currentPage = $scope.currentPage = NG_PAGES[path]; if ( currentPage ) { + $scope.partialPath = 'partials/' + path + '.html'; $scope.currentArea = NG_NAVIGATION[currentPage.area]; var pathParts = currentPage.path.split('/'); var breadcrumb = $scope.breadcrumb = []; @@ -50,6 +44,7 @@ angular.module('DocsController', []) } else { $scope.currentArea = NG_NAVIGATION['api']; $scope.breadcrumb = []; + $scope.partialPath = 'Error404.html'; } });