/** * @ngdoc fbColorPicker * @name fasit.component.fbColorPicker * @fbColorPicker * * @description * directive som ger ett UI för att välja en färg * */ angular.module('fasit') .directive('fbColorPicker', [function () { var link = function (scope: fb.IFbColorPickerScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes) { scope.colors = [ '#FF8A00', '#FFFFFF', '#000000', '#FF0000', '#0000FF', '#FFFF00', '#00FF00', '#00FFFF', '#FF00FF' ]; scope.active = false; scope.setColorString = function (color: string) { scope.color = color; scope.active = false; }; }; return { restrict: 'E', replace: false, scope: { color: '=' }, templateUrl: 'app/Directives/fbColorPicker/fbColorPicker.html', link: link } }]);