0

I am having some trouble with the routes in the Volt framework. I set up my route as follows:

client "/users/{{ id }}", component: 'users', controller: 'main', action: 'profile'

When I navigate to a page to see the profile, everything loads correctly, but the url is:

http://localhost:3000/users?action=profile&id=1234567890

I want the url to look like this:

http://localhost:3000/users/1234567890

Anyone know what I am doing wrong?

user3579220
  • 187
  • 1
  • 2
  • 9
  • How are you navigating to the profiles page? – Ryan Jul 31 '15 at 17:29
  • If I go to `http://localhost:3000/users/1234567890`, it changes the url to `http://localhost:3000/users?action=profile&id=1234567890` and loads the profile page correctly. – user3579220 Aug 03 '15 at 14:45

1 Answers1

0

Usually, components are in views not in routes.

Are you using the users controller? If so I would try this

client "/users/{{ id }}", controller: 'user', action: 'profile'
heri
  • 11
  • 1
  • 3