{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/3231","repository_url":"https://api.github.com/repos/angular-ui/ui-router","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3231/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3231/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3231/events","html_url":"https://github.com/angular-ui/ui-router/issues/3231","id":197813154,"number":3231,"title":"Element attributes in 1.0","user":{"login":"bathos","id":6257356,"avatar_url":"https://avatars.githubusercontent.com/u/6257356?v=3","gravatar_id":"","url":"https://api.github.com/users/bathos","html_url":"https://github.com/bathos","followers_url":"https://api.github.com/users/bathos/followers","following_url":"https://api.github.com/users/bathos/following{/other_user}","gists_url":"https://api.github.com/users/bathos/gists{/gist_id}","starred_url":"https://api.github.com/users/bathos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bathos/subscriptions","organizations_url":"https://api.github.com/users/bathos/orgs","repos_url":"https://api.github.com/users/bathos/repos","events_url":"https://api.github.com/users/bathos/events{/privacy}","received_events_url":"https://api.github.com/users/bathos/received_events","type":"User","site_admin":false},"labels":[{"id":255139505,"url":"https://api.github.com/repos/angular-ui/ui-router/labels/1.0","name":"1.0","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-28T08:08:04Z","updated_at":"2016-12-30T01:43:40Z","closed_at":"2016-12-30T01:43:40Z","body":"I couldn’t find a mechanism to supply attributes to a component in 1.0. I thought bindings might do it, but it seems they aren’t simply adding `attr=\"expression\"` to the component element like I had imagined.\r\n\r\nIs this functionality available? Use cases include usage of attribute directives — especially those associated with layout, e.g. in ngMaterial, which couldn’t justify unique wrapper components."},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/269720412","html_url":"https://github.com/angular-ui/ui-router/issues/3231#issuecomment-269720412","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3231","id":269720412,"user":{"login":"christopherthielen","id":2053478,"avatar_url":"https://avatars.githubusercontent.com/u/2053478?v=3","gravatar_id":"","url":"https://api.github.com/users/christopherthielen","html_url":"https://github.com/christopherthielen","followers_url":"https://api.github.com/users/christopherthielen/followers","following_url":"https://api.github.com/users/christopherthielen/following{/other_user}","gists_url":"https://api.github.com/users/christopherthielen/gists{/gist_id}","starred_url":"https://api.github.com/users/christopherthielen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopherthielen/subscriptions","organizations_url":"https://api.github.com/users/christopherthielen/orgs","repos_url":"https://api.github.com/users/christopherthielen/repos","events_url":"https://api.github.com/users/christopherthielen/events{/privacy}","received_events_url":"https://api.github.com/users/christopherthielen/received_events","type":"User","site_admin":false},"created_at":"2016-12-30T01:43:40Z","updated_at":"2016-12-30T01:43:40Z","body":"> Is this functionality available? \r\n\r\nNo, it's not available.  Can you just write a template for your state instead of \"route to component\"?\r\n\r\nInstead of:\r\n```js\r\n.state('foo', { component: 'foo' });\r\n```\r\n\r\ndo this:\r\n```js\r\n.state('foo', {\r\n  template: '<foo attr=\"expression\"></foo>'\r\n});\r\n```\r\n\r\n> I thought bindings might do it, but it seems they aren’t simply adding attr=\"expression\"\r\n\r\nBindings is explicitly for mapping resolves to attributes.  The resolves are bound using `attr=\"::$resolve.resolvename\"`\r\n\r\n---\r\n\r\n\r\nI'm trying to gauge how common this request might be.  At the moment, it does not seem like it would be a common request, and the workaround (write the template manually) seems pretty trivial.  Therefore I'm closing as \"wontfix\", but if there's additional demand, we will consider reopening and implementing. "}}
{"actor":{"display_login":"christopherthielen"}}