-
Notifications
You must be signed in to change notification settings - Fork 39
Using Angular Material Flex attributes #25
Comments
Ken's example uses angular-material v0.11.x which is now out of date. I update the example to use v1.0.1 As you can see, new version of angular-material changes everything :) Here is a reproduction in codepen.io using angular-formly-templates-material I will look at it but not in next few days. Out of free time :) You can work on it if you want and feel free to message me so I can help you with it. |
Alright. Thanks for the playground. I managed to find a workaround for this now. How you'll have time to look into this soon. Since Angular Material is now 1.x.x their API should be more stable than before ;) |
@robinsving I currently working on it. I'm going to use a different approach and drop the support of formly's You can expect something to this:
|
Is there any progress on adding this flex feature? |
@captainmorgan0 why don't you use http://angular-formly.com/#/example/other/advanced-layout-flex ? |
Because I'm using angular material, not bootstrap. I need to add attributes to the form-field div |
Yeah, right, sorry. I did not check it. I am using angular-formly in my project but with my angular template material, so i will work on it. |
@captainmorgan0 , i checked it. Formly Field group works without BootstrapMaterial. So you can do something like this
it will create div with |
just to say, the origin of the problem may be the angular-material css, in md-input-container element, they change display:'flex' by display:inline-block, it looks like adding width:99% to that element css works even with error messages |
So how will we have this one work, exactly? i.e.
and
The caveat here is that since material is dynamically injecting styles base on flex="??" values, this classes would not become available otherwise. It works with less complex ones nonetheless, like evenly flex I figure I could use $mdMedia and use two templates, however, I would hate myself |
How do you use the flex attributes to make the inout fields scale automatically (according to flex nature)?
When I try to follod Ken's examples, but with angular-formly-templates-material I can't get the flex to work as intended. They instead are all given the min width, as they have here: http://formly-material.meteor.com/demo/input
Is there an example which shows how to add the flex to create an example such as in http://angular-formly.com/#/example/integrations/angular-material using this library?
Using npm:
"angular-formly": "^7.5.0",
"angular-formly-material": "^0.14.1",
"angular-material": "1.0.1",
The text was updated successfully, but these errors were encountered: