This is my example
http://plnkr.co/edit/Foc5vEa5HJ0Uz1fGZXtS?p=preview
css:
.header{ background:#f00; height: 40px; position: fixed; width: 100%; } html,body{ height:100%; margin:0; } .footer{ background:#00f; height:40px; } .main{ padding-top:40px; min-height:calc(100% - 80px); } .main-section{ height:100%; background:#fF0; } .fit-parent-height{ height:100%; } html:
<body ng-controller="MainCtrl"> <div class="header">HEADER</div> <div class="main" fit-parent-height> <div class="main-section" ng-include="'main-section.html'" ></div> <div class="footer">FOOTER</div> </div> </body> js:
scope.$on('$viewContentLoaded',function(e){ //add class to change min-height to height in css; }) I want to make main-section block height fit parent but it not work....
I try to bind $viewContentLoaded, $stateChangeSuccess, $includeContentLoaded, but still not work.
Please help me, thanks.