Wilon
V2EX  ›  Angular

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

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

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

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