Material Angular md-cotent don't get 100% of height

4.4k views Asked by At

I have a problem at the height of the md-content. My app has ng-view and it is 100% of the page, but the md-content don't get 100% of parent. Look that result:

<ng-view flex class="md-padding">
 <md-content flex> foo </md-content>
</ng-view>

I try put style="height: 100%" but not work. I've tried the issues but found that solved my problem.

enter image description here

2

There are 2 answers

0
nitin On

You need to add layout & layout-fill to md-content

 <md-content layout="row" layout-fill class="md-whiteframe-z1">
  Hello
</md-content>
1
Jesús Carrera On

You need to add layout to the ng-view, and make sure the parents also fill 100% height:

<ng-view flex layout="column" class="md-padding">
 <md-content flex> foo </md-content>
</ng-view>