UNPKG

vormjs

Version:

Write your forms in JSON and HTML, use the same API.

21 lines (15 loc) 536 B
/*global angular*/ (function ( ) { angular.module('vorm') .config([ 'vormTemplateServiceProvider', function ( vormTemplateServiceProvider ) { const el = angular.element( '<div class="vorm-radio-group">' + '<label ng-repeat="option in vormControl.getOptions()">' + '<input type="radio" ng-model name="{{::vormField.getName()}}" value="{{::option.value}}"/>' + '{{::option.label}}' + '</label>' + '</div>' ); vormTemplateServiceProvider.registerType('radio', el); }]); })();