search

Home  >  Q&A  >  body text

angular.js - How to dynamically load html in angularJS and delegate it to the controller


This alert('s'); does not appear
How to dynamically load html in this way and hand it over to the controller for control?

淡淡烟草味淡淡烟草味2866 days ago650

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