Skip to content

Commit

Permalink
fix: remove route name to make dynamic navbar useable
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo authored and pi0 committed Sep 28, 2017
1 parent 86069cd commit 6cd0b65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const defaults = {
main: true,
pushState: true,
pushStateSeparator: '!#',
pushStateRoot: null,
iosDynamicNavbar: false
pushStateRoot: null
}
}

Expand Down
3 changes: 1 addition & 2 deletions lib/templates/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function recursiveRoutes(routes, tab, components) {
res += tab + '{\n'
res += tab + '\tpath: ' + JSON.stringify(route.path) + ',\n'
res += tab + '\tcomponent: ' + route._name
res += (route.name) ? ',\n\t' + tab + 'name: ' + JSON.stringify(route.name) : ''
res += (route.children) ? ',\n\t' + tab + 'children: [\n' + recursiveRoutes(routes[i].children, tab + '\t\t', components) + '\n\t' + tab + ']' : ''
res += (route.tabs) ? ',\n\t' + tab + 'tabs: ' + JSON.stringify(route.tabs) : ''
res += '\n' + tab + '}' + (i + 1 === routes.length ? '' : ',\n')
Expand All @@ -34,4 +33,4 @@ const _routes = recursiveRoutes(router.routes, '\t\t', _components)

export default [
<%= _routes %>
]
]

0 comments on commit 6cd0b65

Please sign in to comment.