search

Home  >  Q&A  >  body text

angular.js - angularjs返回html

return '<span class="nhxj-but" ng-click="callseller1(\''+goodId+'\')"> </span>';有一个点击事件,但是点击没有反应,怎么解决?

PHPzPHPz2744 days ago474

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-15 16:57:29

    You need to $compile this yourself. JS is loaded into the DOM to bind events. You need to do it manually if you add it dynamically https://checkcheckzz.gitbooks.io/angularjs-learning-notes/content/chapter18 /18-5.html

    reply
    0
  • Cancelreply