I need to print this array in a form. but it should generate automatically without writing in html file. I tried but I'm not getting the result.
This is to print the values and generate the result (need to write the code in .js file).
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>