fix(dropdown): compatibility with $location url rewriting

Fixes #2343