Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect to page #56

Closed
17x opened this issue Jun 8, 2017 · 1 comment
Closed

Redirect to page #56

17x opened this issue Jun 8, 2017 · 1 comment

Comments

@17x
Copy link

17x commented Jun 8, 2017

how to redirect to home page when enter index app . just like this :
127.0.0.1:8090 to 127.0.0.1:8090/home
when i directly enter 127.0.0.1:8090/home . every thing working good .
I just read docs ( i'm using "@uirouter/react": "^0.5.0" now ) and can not resolve this problem .

`
// app state
const appState = {
name: 'app',
redirectTo: 'app.home',
//redirectTo: 'home',
component: App
};

// home state
const homeStates = {
parent: 'app',
name: 'home',
url: '/home',
component: Home
};
`

thanks !

@jrynlds
Copy link

jrynlds commented Jun 8, 2017

with what you've said... the best advice I can offer is:

const configRouter = router => { router.urlRouter.otherwise("/"); };

You need to set a default route i.e. "/", or in your case, "/home"

Hope that helps

@17x 17x closed this as completed Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants