Wilon
V2EX  ›  Angular

使用 ng-bind-html 动态修改 html 内容,其中 ng-click 没有反应

  •  
  •   Wilon · Feb 9, 2017 · 2872 views
    This topic created in 3407 days ago, the information mentioned may be changed or developed.

    查了一下网上的资料,说是要手动 compile 动态的 html 内容才行,请问具体怎么操作?谢谢大家

    1 replies    2017-02-18 13:22:58 +08:00
    WenJimmy
        1
    WenJimmy  
       Feb 18, 2017
    写成指令, watch 内容变化,然后 compile.
    还有一个不知道相不相关 https://docs.angularjs.org/api/ng/service/$sce 可能只是格式之类的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1187 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 23:24 · PVG 07:24 · LAX 16:24 · JFK 19:24
    ♥ Do have faith in what you're doing.