I have a SPA written in AngularJS. In one of the controllers called 'XYZController', the height of a certain html element in corresponding view is being set as in code below.
The height is being set to 65% of viewport height.
Question: Is there another way of setting height dynamically in angularjs to satisfy the above requirement?
When using a simple html page with JavaScript, this approach of setting height is very normal, but even though it works in angular, I am thinking there might be another way of doing this in angularjs.
function XyzController($scope, $state, $mdSidenav) {
document.getElementById('mdc').style.height =
.65 * Math.max(document.documentElement.clientHeight,
window.innerHeight || 0) + 'px';
}