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