1
如何在div中包裝某些字段並且不使用fieldGroup.I要所有div都有'left-layout'類將由類'left-container'包裝
控制器:以角度形式包裹div中的某些字段
vm.fields = [
{
key: 'first',
type: 'input',
className: 'left-layout',
model: vm.model.name,
templateOptions: {
label: 'First Name'
}
},
{
key: 'last',
type: 'input',
model: vm.model.name,
className: 'left-layout',
templateOptions: {
label: 'Last Name'
}
},
{
key: 'email',
type: 'input',
templateOptions: {
label: 'Email Address',
type: 'email'
}
}
];
的index.html
<script>
$('.left-layout').wrapAll("<div class='left-container'></div>");
</script>
這是jsbin鏈接:http://jsbin.com/honuxi/edit?html,js,output