Skip to content

ui-sref-active doesn't work with query parameters #1513

Closed
@felquis

Description

@felquis

I'm using ui-router 0.2.10, and I'm trying to use ui-sref-active with query parameters. My state is like this:

.state('profile', {
            url: '/profile/:userName?backbutton',
            views: {
                'app-view': {
                    templateUrl: 'templates/profile/profile.html',
                    controller: 'PerfilCtrl'
                }
            }
        })

My markup is:

<a class="menu-item" ui-sref="profile({ userName: me.username, backbutton: true })" ui-sref-active="active">Yo</a>

But, when I'm in http://localhost/profile/name?backbutton=true the ui-sref-active isn't activated.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions