How to add DOM Elements (Angular directives) via jQuery's .append()?

前端 未结 6 1832
半阙折子戏
半阙折子戏 2020-12-13 23:40

Is there any way to add an element that is an Angular directive with jQuery methods like append() and have Angular do its compilation/linking to make it work as

6条回答
  •  忘掉有多难
    2020-12-13 23:57

    You really want to avoid doing any jquery if you can, but I ran into a similar problem not too long ago, here was my question and the correct answer that should be able to help you out. The short answer is using $compile.

提交回复
热议问题