Get HTML Element Height without JQuery in AngularJS

前端 未结 2 749
无人共我
无人共我 2020-12-08 18:35

I\'m getting familiar with AngularJS. I\'m trying to be as \'pure\' as I can. For that reason, I\'m trying to avoid including jQuery. However, I\'m having a challenge gettin

2条回答
  •  北海茫月
    2020-12-08 19:21

    The small wrapper around element provided by angular allows you to ask for properties, so:

    element.prop('offsetHeight');
    

    Will just work fine, see: http://plnkr.co/edit/pFHySDo7hjEcMKCqGuiV?p=preview

提交回复
热议问题