@eform/ng-formio-builder
Version:
The Angular.js form builder component.
23 lines (22 loc) • 639 B
JavaScript
module.exports = [
'formioElementDirective',
function(formioElementDirective) {
return angular.extend({}, formioElementDirective[0], {
scope: false,
controller: [
'$scope',
'formioComponents',
function(
$scope,
formioComponents
) {
$scope.builder = true;
$scope.formComponent = formioComponents.components[$scope.component.type] || formioComponents.components.custom;
if ($scope.formComponent.fbtemplate) {
$scope.template = $scope.formComponent.fbtemplate;
}
}
]
});
}
];