Skip to content

Commit

Permalink
feat(Counter): add Counter route
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-le-singe committed Jan 8, 2017
1 parent 90ce274 commit 516f0a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/common/routes/CounterRoute.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default () => ({
path: 'counter',
getComponent: async (location, cb) => {
const component = await System.import('common/views/CounterView')
cb(null, component.default)
}
})
3 changes: 2 additions & 1 deletion src/common/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import AppLayout from 'common/layouts/AppLayout'
import HomeRoute from './HomeRoute'
import HelloRoute from './HelloRoute'
import AboutRoute from './AboutRoute'
import CounterRoute from './CounterRoute'
import NotFoundRoute from './NotFoundRoute'

export default store => ({ // eslint-disable-line
Expand All @@ -14,6 +15,6 @@ export default store => ({ // eslint-disable-line
childRoutes: [
HelloRoute(),
AboutRoute(),
NotFoundRoute(),
CounterRoute(),
],
})

0 comments on commit 516f0a1

Please sign in to comment.