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.

plunkr

<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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -