0
我需要在窗體中打印此數組。但它應該自動生成而不用寫入html文件。我試過但我沒有得到結果。如何在Angularjs中的表單內打印數組值?
這是打印值並生成結果(需要在.js文件中編寫代碼)。
result+='<form action="http://www.example123.com" method="post" onsubmit="target_popup(this)">';
for(component in components){
result+= mylogic(component,components);
}
"<div> <button >Submit</button> </div></form>";
$scope.target_popup=function (form) {
window.open('', 'formpopup', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,width=400,height=400,resizeable,scrollbars');
}
})
<html>
<div ng-bind-html="mylogic(result) | unsafe"></div>
</html>
: - 你會幫助我嗎? https://codepen.io/anon/pen/ybOjqv –
:-i試圖以我需要的方式調用我的動態json輸入,但不工作 –
模塊和基本組件在codepen中缺失,請創建一個有效的演示 –