javascript - Angular UI - Modal Height relative to window Height -
i have modal quite bit of text. i'm trying figure out how restrict modal height size of window , add scrollbar content area, above ok button.
<note> <to>tove</to> <from>jani</from> <to>tove</to> <from>jani</from> <to>tove</to> <from>jani</from> <to>tove</to> <from>jani</from> <to>tove</to> <from>jani</from> <to>tove</to> <from>jani</from> <to>tove</to> <from>jani</from> <to>tove</to> <from>jani</from> <to>tove</to> ....
updated use window.innerheight , have attribute/directive called clientheight takes number , uses percentage multiply window.innerheight size contents , set overflow-y
http://plnkr.co/edit/9eg3jh0vilntygmn3ied?p=preview
app.directive('clientheight', function(){ return { link:function(scope, ielem, iattrs){ debugger; ielem.css('height', window.innerheight*iattrs.clientheight/100+'px') ielem.css('overflow-y', 'scroll') } } });
you can pull off css alone maybe using "calc" or otherwise if not above js solution works fine too.
Comments
Post a Comment