Sha256: 437d7e8a4ed773aa7fcefff43e5bd7af3bf0f035c62439e9be46695d06e5f06f
Contents?: true
Size: 734 Bytes
Versions: 12
Compression:
Stored size: 734 Bytes
Contents
angular.module 'paramsarray', [] angular.module('paramsarray').directive 'paramsarray', [ '$filter' ($filter) -> link = (scope, element, attrs, ctrl) -> scope.parameter.values = [] scope.addItem = ()-> scope.parameter.values.push jQuery.extend(true, {}, scope.parameter.parameters) return { link: link restrict: 'A' require: 'ngModel' scope: parameter: '=ngModel' template: '' + '<div ng-repeat="value in parameter.values track by $index" style="border: 1px solid lightgray; margin: 1px 1px 1px 10px">' + ' <div params ng-model="value"></div>' + '</div>' + '<a class="btn btn-success btn-xs" ng-click="addItem()">+</a>' } ]
Version data entries
12 entries across 12 versions & 1 rubygems