diff --git a/lib/app/js/controllers/element.js b/lib/app/js/controllers/element.js index 6674692f..a3cbdfe4 100644 --- a/lib/app/js/controllers/element.js +++ b/lib/app/js/controllers/element.js @@ -3,8 +3,15 @@ angular.module('sgApp') $rootScope, Styleguide) { var section = $stateParams.section.split('.'), - reference = section[0] + '.' + section[1], + reference, + modifier; + + if (section.length == 3) { modifier = section[2]; + reference = section[0] + '.' + section[1]; + } else { + reference = $stateParams.section; + } Styleguide.get() .success(function(data) {