{"action":"created","issue":{"url":"https://api.github.com/repos/formly-js/angular-formly/issues/161","labels_url":"https://api.github.com/repos/formly-js/angular-formly/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/formly-js/angular-formly/issues/161/comments","events_url":"https://api.github.com/repos/formly-js/angular-formly/issues/161/events","html_url":"https://github.com/formly-js/angular-formly/issues/161","id":56534139,"number":161,"title":"Wrapper Options ?","user":{"login":"ShMcK","id":4660659,"avatar_url":"https://avatars.githubusercontent.com/u/4660659?v=3","gravatar_id":"","url":"https://api.github.com/users/ShMcK","html_url":"https://github.com/ShMcK","followers_url":"https://api.github.com/users/ShMcK/followers","following_url":"https://api.github.com/users/ShMcK/following{/other_user}","gists_url":"https://api.github.com/users/ShMcK/gists{/gist_id}","starred_url":"https://api.github.com/users/ShMcK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShMcK/subscriptions","organizations_url":"https://api.github.com/users/ShMcK/orgs","repos_url":"https://api.github.com/users/ShMcK/repos","events_url":"https://api.github.com/users/ShMcK/events{/privacy}","received_events_url":"https://api.github.com/users/ShMcK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-02-04T14:39:21Z","updated_at":"2015-02-07T06:24:08Z","closed_at":null,"body":"Would it be possible to provide options for a `wrapper`?\r\n\r\nA use-case would be when creating a form grid, passing in the column size. For example: `class=\"col{{wrapper.options.colSize}}\"`. Another use case may be setting inline display, i.e. `style=\"display: {{wrapper.options.display || 'block'}};\"`\r\n\r\nThe current strength of Angular-Formly (quick, easy forms) is also it's weakness (one size, block display). I hope to take advantage of greater flexibility with 3.0.0."},"comment":{"url":"https://api.github.com/repos/formly-js/angular-formly/issues/comments/73352297","html_url":"https://github.com/formly-js/angular-formly/issues/161#issuecomment-73352297","issue_url":"https://api.github.com/repos/formly-js/angular-formly/issues/161","id":73352297,"user":{"login":"ShMcK","id":4660659,"avatar_url":"https://avatars.githubusercontent.com/u/4660659?v=3","gravatar_id":"","url":"https://api.github.com/users/ShMcK","html_url":"https://github.com/ShMcK","followers_url":"https://api.github.com/users/ShMcK/followers","following_url":"https://api.github.com/users/ShMcK/following{/other_user}","gists_url":"https://api.github.com/users/ShMcK/gists{/gist_id}","starred_url":"https://api.github.com/users/ShMcK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShMcK/subscriptions","organizations_url":"https://api.github.com/users/ShMcK/orgs","repos_url":"https://api.github.com/users/ShMcK/repos","events_url":"https://api.github.com/users/ShMcK/events{/privacy}","received_events_url":"https://api.github.com/users/ShMcK/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T06:24:08Z","updated_at":"2015-02-07T06:24:08Z","body":"I'm trying to setup `flex-box` with `angular-formly-templates-lumx`. Unfortunately, I haven't been able to get it to work based on [this `jsbin` example](http://jsbin.com/jaloz/2/edit?html,js,output).\r\n\r\n    Error: `Formly Error: You have specified field properties that are not allowed: \"fields\"`.\r\n\r\n# Questions\r\n1. How could I add a custom field `fields: []` to my template?\r\n2. Is it possible to define and add other custom fields? Hmm...\r\n\r\n***\r\n\r\n# Current Proposed API\r\n\r\n### lx-wrapper-flex-container API\r\n```javascript\r\n{\r\n  'key': 'modelName',\r\n/* type or wrapper? type is required by formly */\r\n  'type': 'lx-wrapper-flex-container', \r\n  'templateOptions': {\r\n    'container': 'row', // row | column | row-reverse | column-reverse\r\n    'wrap': 'nowrap', // nowrap | wrap | wrap-reverse\r\n    'align': 'space-between', // flex-start | flex-end | center | space-between | space-around | stretch\r\n    'class': 'bgc-red-500', // ng-class\r\n    'style': 'height: 200px'\r\n  },\r\n/* as in the jsbin example. */\r\n  'fields': [{\r\n    /* 'lx-wrapper-flex-item' fields here */\r\n  }]\r\n}\r\n```\r\n\r\n### lx-wrapper-flex-item API\r\n```javascript\r\n{\r\n  'key': 'modelName',\r\n  'type': 'lx-whatever-type'\r\n  'wrapper': 'lx-wrapper-flex-item', // <- add the wrapper\r\n  'templateOptions': {\r\n    'flex': {\r\n      'item': '1' // flex-value number, higher weights the space ratio more \r\n      'order': '1', // value for ordering boxes\r\n      'class': 'bgc-red-500' // ng-class\r\n    }\r\n  }\r\n}\r\n```\r\n"}}