aboutsummaryrefslogtreecommitdiffstats
path: root/docs/app/src/search.js
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-03-07 19:57:39 +0000
committerPeter Bacon Darwin2014-03-07 20:05:58 +0000
commit853999de10b8fd0116f9da80af2c192a4a5fd39b (patch)
tree3eb5e87ecd5f41152af996831d4e29ce08581359 /docs/app/src/search.js
parent53ec5e13e5955830b6751019eef232bd2125c0b6 (diff)
downloadangular.js-853999de10b8fd0116f9da80af2c192a4a5fd39b.tar.bz2
docs(404 errors): provide a better 404 experience
It is a bit rough and ready but does a better job than nothing.
Diffstat (limited to 'docs/app/src/search.js')
-rw-r--r--docs/app/src/search.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/app/src/search.js b/docs/app/src/search.js
index 9ae18ff6..49d73343 100644
--- a/docs/app/src/search.js
+++ b/docs/app/src/search.js
@@ -45,6 +45,10 @@ angular.module('search', [])
};
}])
+.controller('Error404SearchCtrl', ['$scope', '$location', 'docsSearch', function($scope, $location, docsSearch) {
+ $scope.results = docsSearch($location.path().split(/[\/\.:]/).pop());
+}])
+
.factory('lunrSearch', function() {
return function(properties) {
if (window.RUNNING_IN_NG_TEST_RUNNER) return null;