search

Home  >  Q&A  >  body text

angular.js - angularJS: 数据加载完后执行js

<p id="goodlist">
   <p ng-repeat="good in goods">{{good}}</p>
</p>

数据循环完后,用js获取这个p的高度,获取的数值一直不对。该怎么解决?

巴扎黑巴扎黑2744 days ago493

reply all(2)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-15 17:03:01

    Put the code for getting p height inside $timeout() and try it

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-15 17:03:01

    http://stackoverflow.com/questions/13471129/ng-repeat-finish-event

    reply
    0
  • Cancelreply