<!DOCTYPE qhelp PUBLIC"-//Semmle//qhelp//EN""qhelp.dtd"><qhelp><overview><p>The AngularJS compiler processes (parts of) the DOM, determining which directives matchwhich DOM elements, and then applies the directives to the elements. Each DOM elementshould only be compiled once, otherwise unexpected behavior may result.</p></overview><recommendation><p>Only compile new DOM elements.</p></recommendation><example><p>The following example (adapted from the AngularJS developer guide) shows a directivethat adds a tooltip to a DOM element, and then compiles the entire element toapply nested directives.</p><sample src="examples/DoubleCompilation.js"/><p>This is problematic, since it will recompile all of <code>element</code>, includingparts that have already been compiled.</p><p>Instead, only the new element should be compiled:</p><sample src="examples/DoubleCompilationGood.js"/></example><references><li>AngularJS Developer Guide: <a href="https://docs.angularjs.org/guide/compiler#double-compilation-and-how-to-avoid-it">Double Compilation, and how to avoid it</a>.</li></references></qhelp>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。