I am trying to set dynamically height to element in my demo .I will tell you issue I am taking static or constant value of height in my demo .I take 250px const
Here is an example for applying other elements width to current element.
Width of the element which has the class name "container" will apply to div using flexibleCss angular js directive
myApp.directive('flexibleWidth', function(){
return function(scope, element, attr) {
var className = attr.widthof;
var classWidth = angular.element(document.querySelectorAll('.'+className)[0])[0].clientWidth;
element.css({
width: classWidth+ 'px'
});
};
});