{"action":"created","issue":{"url":"https://api.github.com/repos/formly-js/ngx-formly/issues/736","repository_url":"https://api.github.com/repos/formly-js/ngx-formly","labels_url":"https://api.github.com/repos/formly-js/ngx-formly/issues/736/labels{/name}","comments_url":"https://api.github.com/repos/formly-js/ngx-formly/issues/736/comments","events_url":"https://api.github.com/repos/formly-js/ngx-formly/issues/736/events","html_url":"https://github.com/formly-js/ngx-formly/pull/736","id":298600790,"number":736,"title":"feat(core): allow rendering extra attributes","user":{"login":"aitboudad","id":1753742,"avatar_url":"https://avatars2.githubusercontent.com/u/1753742?v=4","gravatar_id":"","url":"https://api.github.com/users/aitboudad","html_url":"https://github.com/aitboudad","followers_url":"https://api.github.com/users/aitboudad/followers","following_url":"https://api.github.com/users/aitboudad/following{/other_user}","gists_url":"https://api.github.com/users/aitboudad/gists{/gist_id}","starred_url":"https://api.github.com/users/aitboudad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aitboudad/subscriptions","organizations_url":"https://api.github.com/users/aitboudad/orgs","repos_url":"https://api.github.com/users/aitboudad/repos","events_url":"https://api.github.com/users/aitboudad/events{/privacy}","received_events_url":"https://api.github.com/users/aitboudad/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-02-20T13:51:07Z","updated_at":"2018-02-20T19:03:48Z","closed_at":"2018-02-20T18:53:43Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/formly-js/ngx-formly/pulls/736","html_url":"https://github.com/formly-js/ngx-formly/pull/736","diff_url":"https://github.com/formly-js/ngx-formly/pull/736.diff","patch_url":"https://github.com/formly-js/ngx-formly/pull/736.patch"},"body":"**What kind of change does this PR introduce? feature**\r\n\r\n**What is the current behavior? (You can also link to an open issue here)**\r\nThere is no way to allow rendering extra html attribures\r\n\r\n**What is the new behavior (if this is a feature change)?**\r\nIntroduce `attributes` options which allow users to specify which option in `templateOption` can be used as an attribute.\r\n\r\nfor example for range type we can use:\r\n```ts\r\n{\r\n  key: 'age',\r\n type: 'input',\r\n  templateOptions: {\r\n      attributes: {\r\n        min: 5,\r\n        max: 10,\r\n      },\r\n  }\r\n}\r\n```\r\n\r\nwe can also set those attributes globally in formly declaration:\r\n\r\n```ts\r\n    FormlyModule.forRoot({\r\n      types: [\r\n        {\r\n          name: 'range',\r\n          extends: 'input',\r\n          defaultOptions: {\r\n            templateOptions: {\r\n              type: 'range',\r\n              attributes: {\r\n                min: 5,\r\n                max: 10,\r\n              },\r\n            },\r\n          },\r\n        },\r\n      ],\r\n    }),\r\n```\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/formly-js/ngx-formly/736)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/formly-js/ngx-formly/issues/comments/367083284","html_url":"https://github.com/formly-js/ngx-formly/pull/736#issuecomment-367083284","issue_url":"https://api.github.com/repos/formly-js/ngx-formly/issues/736","id":367083284,"user":{"login":"beeman","id":36491,"avatar_url":"https://avatars3.githubusercontent.com/u/36491?v=4","gravatar_id":"","url":"https://api.github.com/users/beeman","html_url":"https://github.com/beeman","followers_url":"https://api.github.com/users/beeman/followers","following_url":"https://api.github.com/users/beeman/following{/other_user}","gists_url":"https://api.github.com/users/beeman/gists{/gist_id}","starred_url":"https://api.github.com/users/beeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeman/subscriptions","organizations_url":"https://api.github.com/users/beeman/orgs","repos_url":"https://api.github.com/users/beeman/repos","events_url":"https://api.github.com/users/beeman/events{/privacy}","received_events_url":"https://api.github.com/users/beeman/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T19:03:48Z","updated_at":"2018-02-20T19:03:48Z","author_association":"CONTRIBUTOR","body":"Thanks for another quick merge @aitboudad.\r\n\r\nI will open on an issue where we can discuss further API changes for a next major release."}}
{"actor":{"display_login":"beeman"}}