<div id="divProductItems"></div>
divの上のdivは、別のjsファイルからのajax呼び出しの後にhtml + angularjs要素で埋められます。しかし、anglejsのコードは現在正しく動作していません。私はこの問題Angularjsを含む動的HTMLコードをコンパイルする方法は?
function getProductItems() {
var productSelected = $('#hdnSelectedProducts').val();
callActionWithJson("/Item/ProductItem", function (data) {
$("#divProductItems").html(data); // here I add the dynamic code to the above div and (data) contains the dynamic html + angularjs directives
filterProductItem();
}, null, "pricingLevelId", $("#ddlPricingLevel").val(), "searchItem", $("#txtSearchItem").val(), "productId", (productSelected.length != null ? productSelected : 0));
}
使用 '$コンパイル()'動的な角度コード –
をコンパイルするために、私は、同様のタイプの質問に詳細に、私はそれでそれを修正することができなかったことを私に教えてくださいことを見ました。 $ compile()の使い方は? –