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
set dynamically height with header footer to element? HTML
JS
app.directive('winHeight', function ($window) {
return{
link: function (scope, element, attrs) {
angular.element(window).resize(function () {
scope.winHeight();
});
setTimeout(function () {
scope.winHeight();
}, 150);
scope.winHeight = function () {
element.css('min-height', angular.element(window).height() -
(angular.element('#header').height() +
angular.element('#footer').height()));
}
}
}
})