0

I have a Container that loads multiple views

<md-content flex id="content">
     <div ng-view></div>
</md-content>

For Example one of those views loaded looks like this

<div layout="column" id="selection-whiteframe" ng-controller="MathCtrl">
    [Header Row Here]
    <md-content id="MathContent">
        [SomeContent]
    </md-content>
</div>

The Problem is, that if there is too much Content in "MathContent", the NG-View Div becomes Scrollable and not the "MathContent" Md-Content whats not wanted because the [Header Row] should have a fixed position.

Is it somehow possible to prohibit an Element (for example the ng-view) from beeing scrollable or can I lock the Maximum Size of selection-whiteframe to the height of the ng-view?

2
  • you can do this via the css property "overflow" Commented Mar 4, 2016 at 10:09
  • Can you make a plunker for that? Commented Mar 4, 2016 at 10:13

1 Answer 1

1

This is a bit tricky, to make it work in Chrome you just need to add layout="column/row" on every level.

<body layout="column">
    <md-content layout="column" flex id="content">
        <div layout="column" ng-view>
            <div layout="column" id="selection-whiteframe" ng-controller="MathCtrl">
                [Header Row Here]
                <md-content layout="column"  id="MathContent">
                   [SomeContent]
                </md-content>
            </div>
        </div>
    </md-content>

But this will not work in Firefox. To make it work everywhere, you need to also replace all the div's with md-content.

<body layout="column">
    <md-content layout="column" flex id="content">
        <md-content layout="column" ng-view>
            <md-content layout="column" id="selection-whiteframe" ng-controller="MathCtrl">
                [Header Row Here]
                <md-content layout="column"  id="MathContent">
                   [SomeContent]
                </md-content>
            </md-content>
        </md-content>
    </md-content>

Here is a simple codepen and I refer you to my answer here: https://stackoverflow.com/a/29516060/2553215

http://codepen.io/kuhnroyal/pen/GZoRwz

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.