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

Commit

Permalink
feat(docs): allow custom routes in examples #23
Browse files Browse the repository at this point in the history
  • Loading branch information
m7r committed Jul 26, 2013
1 parent 25a375e commit 2836e46
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/templates/js/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,11 @@ docsApp.controller.DocsController = function($scope, $location, $window, section
var parts = path.split('/'),
sectionId = parts[1],
partialId = parts[2],
sectionName = $scope.sections[sectionId] || sectionId,
page = sections.getPage(sectionId, partialId);
page, sectionName = $scope.sections[sectionId];

$scope.currentPage = sections.getPage(sectionId, partialId);
if (!sectionName) { return; }

$scope.currentPage = page = sections.getPage(sectionId, partialId);

if (!$scope.currentPage) {
$scope.partialTitle = 'Error: Page Not Found!';
Expand Down

0 comments on commit 2836e46

Please sign in to comment.