14 lines
298 B
JavaScript
14 lines
298 B
JavaScript
angular.module("robware").directive("equalWidth", function() {
|
|
return {
|
|
restrict: 'A',
|
|
link: function(scope, element) {
|
|
scope.getHeight = function() {
|
|
return $(element).height();
|
|
};
|
|
scope.$watch(scope.getHeight, function(height) {
|
|
$(element).width(height);
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|