diff options
| author | Peter Bacon Darwin | 2014-03-07 19:57:39 +0000 |
|---|---|---|
| committer | Igor Minar | 2014-03-11 10:39:47 -0700 |
| commit | ebe280eedea416c84c2300c9b952bb42d73cdb53 (patch) | |
| tree | 172256dea1e52e7383228059af45a430fd072bd5 /docs/app/src/search.js | |
| parent | 95d6cdc7c71454cebcab59858f0c3daa69fc9347 (diff) | |
| download | angular.js-ebe280eedea416c84c2300c9b952bb42d73cdb53.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.js | 4 |
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; |
