{"action":"closed","issue":{"url":"https://api.github.com/repos/aurelia/templating-router/issues/22","repository_url":"https://api.github.com/repos/aurelia/templating-router","labels_url":"https://api.github.com/repos/aurelia/templating-router/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/templating-router/issues/22/comments","events_url":"https://api.github.com/repos/aurelia/templating-router/issues/22/events","html_url":"https://github.com/aurelia/templating-router/issues/22","id":130631606,"number":22,"title":"Suggestion to improve route-href syntax","user":{"login":"stsje","id":15363306,"avatar_url":"https://avatars.githubusercontent.com/u/15363306?v=3","gravatar_id":"","url":"https://api.github.com/users/stsje","html_url":"https://github.com/stsje","followers_url":"https://api.github.com/users/stsje/followers","following_url":"https://api.github.com/users/stsje/following{/other_user}","gists_url":"https://api.github.com/users/stsje/gists{/gist_id}","starred_url":"https://api.github.com/users/stsje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stsje/subscriptions","organizations_url":"https://api.github.com/users/stsje/orgs","repos_url":"https://api.github.com/users/stsje/repos","events_url":"https://api.github.com/users/stsje/events{/privacy}","received_events_url":"https://api.github.com/users/stsje/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-02-02T09:54:09Z","updated_at":"2016-07-04T14:39:13Z","closed_at":"2016-07-04T14:39:13Z","body":"I find the syntax for route-href difficult to remember, and it doesn't feel natural to type.\r\nYou're currently forced to use a JSON-like syntax when declaring your route-href's. My suggestion is to improve it, so we don't have to memorize this weird looking syntax.\r\n\r\nCurrent syntax:\r\n`<a route-href=\"route: routeName; params.bind: routeParams\"></a>`\r\n\r\nSuggestion, introducing an attribute to hold the parameters:\r\n`<a route-href=\"routeName\" params.bind=\"routeParams\"></a>`\r\n\r\nroute-href will then just point to the route name, and the params attribute to the parameters.\r\nWe can take it even further, and explicit tell the router which parameter to bind\r\n`<a route-href=\"routeName\" params.id.bind=\"user.id\"></a>`\r\n\r\nHaving both `params.bind` and `params.id.bind` on the same element, should result in `params.id.bind` having precedence over the params binding.\r\n`<a route-href=\"routeName\" params.bind=\"routeParams\" params.id.bind=\"user.id\"></a>`"}}
{"actor":{"display_login":"EisenbergEffect"}}