{"size": 865, "ext": "js", "max_stars_repo_path": "src/app/common/components/randomColor/randomColor.directive.js", "max_stars_repo_name": "ppanditsaaksshaat/goHrUI", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/app/common/components/randomColor/randomColor.directive.js", "max_issues_repo_name": "ppanditsaaksshaat/goHrUI", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/app/common/components/randomColor/randomColor.directive.js", "max_forks_repo_name": "ppanditsaaksshaat/goHrUI", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.8928571429, "max_line_length": 101, "alphanum_fraction": 0.5040462428}
/**
 * @author Pardeep.Pandit
 * created on 17.05.217
 */
(function () {
    'use strict';

    angular.module('BlurAdmin.common.components')
        .directive('randomColor', randomColor);
    /** @ngInject */
    function randomColor($location, $state, $compile, $rootScope, $timeout, dialogModal, pageService,
        editFormService, focus, $filter, DJWebStore, $stateParams) {
            return {
                restrict: 'EA',
                replace: false,
                link: function (scope, element, attr) {
        
                    //generate random color
                    var color = '#' + (Math.random() * 0xFFFFFF << 0).toString(16); 
                    
                    //Add random background class to selected element
                    element.css('background-color', color);
        
                }
            }
    }

})();