emberjs/ember.js — pull request #4073 by raytiley (2014-01-05 17:45:36+00:00)
Title: [FEATURE query-params-new] Use QP for {{link-to}} active class

This commit updates `router.js` with code from this pull request: https://github.com/tildeio/router.js/pull/74

With that enabled the `{{link-to}}` helper takes query param changes in account when calculating the active class.

An active class will be applied as long as the the transition would not result in change of current query params or addition of new query params. For example:

Current URL: `/?foo=123&bar=abc`

Link: `{{#link-to 'index'}}Home{{/link-to}}`
The active class is applied because there are no effective changes in the query params or route.

Link: `{{#link-to 'index' (query-params foo='123')}Change foo to 123{{/link-to}}`
The active class is applied because the supplied value for `foo` is the current value.

Link: `{{link-to 'index' (query-params foo='456')}}Change foo to 456{{/link-to}}`
The active class is NOT applied because the value of `foo` would change from 123 -> 456 even though the route stays the same.

Link `{{link-to 'index' (query-params foo=`123` sort='name')}}Sort by name{{/link-to}}
The active class is NOT applied because a new query param `sort` would be added which is not part of the current URL.