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中缺失,请创建一个有效的演示 –