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
You could simply achieve this by own directive which will add css dynamically
Markup
tell Mother name
Directive
.directive('setHeight', function($window){
return{
link: function(scope, element, attrs){
element.css('height', $window.innerHeight/3 + 'px');
//element.height($window.innerHeight/3);
}
}
})
The better solution would be you could use ng-style directive that expects the values in JSON format.
tell Mother name
Working Codepen