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

Route is not resolved when only using query parameter in URL #162

Closed
MatthiasReining opened this issue Oct 17, 2017 · 3 comments
Closed

Comments

@MatthiasReining
Copy link

Hi,
I'm using "navigo": "^5.3.2".

I have following code:

var router = new Navigo(null, true, '#!');
router.on({ '/home': function (query) { 
     console.log('router->on query:', query); 
     mainApp.loadCtrl(HomeCtrl, query)
  }
});

Calling http://localhost:3000/#!/home works - route is found.
Calling http://localhost:3000/#!/home?q=test is not working - route is not found.

If I use a param, like in the example on github project page, it's working:

router.on({ '/home/:useless': function (params, query) { 
     console.log('router->on query:', query, 'params', params); 
     mainApp.loadCtrl(HomeCtrl, query)
  }
});

Calling http://localhost:3000/#!/home/x is working!
Calling http://localhost:3000/#!/home/x?q=test is working!

If I have just a query param without parameterized URLs, the URL is not resolved.

Do you have any idea what I'm doing wrong?

Thanks,
Matthias

@Datamance
Copy link

Same exact issue over here!

@krasimir
Copy link
Owner

@mr678 @Datamance can you please try 5.3.3 version.

@MatthiasReining
Copy link
Author

@krasimir works! :-) Thank you so much for providing a fix so fast 👍

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

3 participants