I have a problem setting the flex properties of my layout. Here is a plunker: http://embed.plnkr.co/0SrUp25FvT2PAsJDEwF3/preview
<md-content flex layout="row" layout-align="center">
<div layout="column">
<div flex layout="column" layout-fill>
<div flex="33">
<md-input-container>
<label>Enter Room's Name</label>
<input ng-model="test" placeholder="Enter Room's Name">
</md-input-container>
</div>
<div flex="66">
<md-button class="md-raised md-accent">
Create Chat Room
</md-button>
</div>
</div>
</div>
</md-content>
Here is the link to documentation: https://material.angularjs.org/#/layout/grid
The issue that the flex property of the input (text) and input (button) are not obeying the flex attribute.
What I am trying to achieve is something like that:
When compare to AngularJS Material layout, angular flex layout has several advantages. The Angular flex layout code is easier to maintain and debug. Angular flex layout does not depend upon Angular Material. There is no external CSS requirements. Angular flex layout Supports different kinds of Handset/Tablet and Orientation breakpoints.
Flex-layout is a package made for Angular to use CSS flex-box features, you just add directives in html tags to render it flexible and responsive. Let’s see how beginning with all this! Check out our Angular In-House trainings or a public Angular course s. Try out fossilo.com our angular project to archive complete websites.
With mat elements, you can make a nice interface in a very short amount of time. Flex-layout is a package made for Angular to use CSS flex-box features, you just add directives in html tags to render it flexible and responsive. Let’s see how beginning with all this! Check out our Angular In-House trainings or a public Angular course s.
AngularJS Material clearly explained the limitations of a CSS based FlexBox layout like limitations with using parameterized values. Even for limited set of allowed value variations we need to write so many required CSS classes which increses the complexity of the code.
here is the result after I tried it,
hopefully it helps:
<md-content layout="row" layout-align="center">
<div layout="column">
<div flex layout="column" layout-fill> <!-- this is what I change -->
<div flex="33">
<md-input-container>
<label>Enter Room's Name</label>
<input ng-model="test" placeholder="Enter Room's Name">
</md-input-container>
</div>
<div flex="66">
<md-button class="md-raised md-accent">
Create Chat Room
</md-button>
</div>
</div>
</div>
</md-content>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With