I am trying out angular material, and in particular the flex layout attributes.
I have a column layout containing a child div with a row layout, which contains a further two child items, one of which has flex.
What I would like is for the first child item to scroll, but not the second.
<div ng-app="app"
layout="column" class="demo" >
<md-toolbar>
<h2 class="md-toolbar-tools">
<span>Toolbar</span>
</h2>
</md-toolbar>
<md-content>
<div layout="row">
<md-card flex>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
Load of content<br/>
</md-card>
<div>dgfdgfdg</div>
</div>
</md-content>
</div>
Current implementation - http://codepen.io/anon/pen/merXpr
I noticed the md-content directive can be used for scrolling content, which I tried by wrapping around the containing div housing my two child items, but of course this just makes the whole content area scroll.
Is there a way I can get just the md-card item to scroll? I did try wrapping md-card with the md-content instead, but this made no difference.
Thanks
position:fixed
css to the second child element would work, but that's a workaround and not recommended – Mohit Adwani