search

Home  >  Q&A  >  body text

angular.js - angularJS动态加载html如何委托给控制器


这个alert('s');不出现
如何通过这种动态加载html并且交给控制器去控制呢?

淡淡烟草味淡淡烟草味2744 days ago577

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-15 17:00:22

    1. Will this code report an error?
    2. Why do you need to start angular in the instruction, and your instruction does not specify restrict? 3. To dynamically load HTML, you need to determine that the HTML needs to be compiled before it can be bound to Angular. Take a look at $compile and $sec

    reply
    0
  • Cancelreply