passman/js/app/directives/use-theme.js
2016-09-26 19:15:39 +02:00

25 lines
504 B
JavaScript

'use strict';
/**
* @ngdoc directive
* @name passmanApp.directive:passwordGen
* @description
* # passwordGen
*/
angular.module('passmanApp')
.directive('useTheme', ['$window', function ($window) {
return {
restrict: 'A',
scope:{
type: '=type'
},
link: function (scope, el, attr, ctrl) {
var _color = $('#header').css('background-color');
if(!scope.type) {
$(el).css('background-color', _color);
} else {
$(el).css(scope.type, _color);
}
}
};
}]);