json-schema-form / angular-schema-form-material

Angular Material decorator for Angular Schema Form
MIT License
52 stars 45 forks source link

Tabs #3

Open marvinosswald opened 9 years ago

marvinosswald commented 9 years ago

Working on implementation of mdTabs...

[Error] Error: [$compile:multidir] Multiple directives [mdTabs (module: material.components.tabs), sfField] asking for new/isolated scope on: <md-tabs md-dynamic-height="" md-border-bottom="" sf-field="0">
Anthropic commented 9 years ago

@marvinosswald I started looking at it and ended up adding some very basic support for tabs, so you can see what was required, I added an example specific to tabs to see their behaviour clearer too.

I would really appreciate it, if you have time, to add support for the options like dynamic height, stretching, pagination, initial active tab, disabled etc...

I haven't looked into what else there is an not into those options deep enough to have much input at this stage, but feel free to let @davidlgj or myself know if you have any thoughts or questions on how to approach it.

marvinosswald commented 9 years ago

Thank you very much, will look into this hopefully this weekend. Already implemented basic support for switches, but as I've done some huge changes to the project structure I'm not sure how to contribute back to you guys. For example I've extended .gitignore and so on..

Here

Maybe I'm going to tidy up some stuff and then post u a clean PR

davidlgj commented 9 years ago

@marvinosswald you're getting the error since the first element in your template (in this case md-tabs) is asking for a private scope. The sfField builder adds a sf-field directive to the first element in the template. So you might have to wrap the md-tabs directive in a div or something else.

You probably already seen it, and I'm not sure if it helps, but the builder function for the bootstrap decorator tabs is here: https://github.com/Textalk/angular-schema-form-bootstrap/blob/develop/src/bootstrap-decorator.js#L13