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

URL with params issue. #1552

Closed
dmackerman opened this issue Nov 17, 2014 · 2 comments
Closed

URL with params issue. #1552

dmackerman opened this issue Nov 17, 2014 · 2 comments

Comments

@dmackerman
Copy link

I think I found a possible bug. Here's some config code:

$stateProvider
    .state('inventory', {
        url: '/inventory?productId&isTracked',
        views: {
            'main': {
                controller: 'InventoryController',
                templateUrl: 'inventory/inventory.tpl.html'
            }
        },
    })
    .state('inventory.item', {
        url: '/:itemId',
        views: {
            'main@':  {
                templateUrl: 'inventory/item/item.tpl.html',
                controller: 'ItemController'
            }
        }
    });

In my parent inventory state, I need to have optional query params. This works just fine - the URLs turn out to be something like /inventory?productId=3. However, when I navigate to the item.inventory state, I just want the URLs to be /inventory/item/3 - but this doesn't work. It appends the itemId as a query param like so: /inventory/item/?itemId=3. If I remove the optional query params from inventory state, the URL builds as expected.

@dmackerman dmackerman changed the title URL URL with params issue. Nov 17, 2014
@christopherthielen
Copy link
Contributor

dupe #1543

fix is committed to master, 0.2.13 will be real soon now

@dmackerman
Copy link
Author

Thanks, appreciate it.

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