-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from EWhite613/patch-1
Add custom routing for demo. Making compatible with frost-guide
- Loading branch information
Showing
4 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
import Ember from 'ember' | ||
import config from './config/environment' | ||
import addRoute from 'frost-guide-custom-routing/utils/addRoute' | ||
|
||
var Router = Ember.Router.extend({ | ||
location: config.locationType | ||
}) | ||
|
||
Router.map(function () { | ||
this.route('demo', { path: '/' }) | ||
this.route('custom-login') | ||
let routerConfig = config.APP.routingConfig | ||
routerConfig.forEach((item) => { | ||
addRoute.call(this, item) | ||
}) | ||
}) | ||
|
||
export default Router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = [ | ||
{ | ||
id: 'demo', | ||
alias: 'Demo', | ||
type: 'category', | ||
route: 'demo', | ||
path: { | ||
path: '/' | ||
} | ||
}, { | ||
id: 'custom-login', | ||
alias: 'Custom Login', | ||
type: 'category', | ||
route: 'custom-login' | ||
} | ||
] |