1.0.6 • Published 6 years ago
@zores/vsizer v1.0.6
@zores/vsizer
Is a Angular 5 module with a directive for automaticaly resizing the height of a div
based on browser innerHeight
.
Instalation
Install using the command
npm install @zores/vsizer
Usage
Add the AzVSizerModule
to module imports.
vsizer
will only work on div
tag.
Just add vsizer
attribute to the div
. This will make the height equal to browser inner height.
<div vsizer ... >
...
</div>
But, most of the times a minimum height is required to be set. For that just add the attribute vsiver.min
<div vsizer vsizer.min="560px" ... >
...
</div>
Or is needed to subtract some height for a toolbar or some other element, then use the attribute vsizer.less
<div vsizer vsizer.less="64px" ...>
...
</div>
Other way to write it is by configuring the vsizer
attribute
<div [vsizer]="{min:'500px', less:'64px'}" ... >
...
</div>
And the width
will be set to 100%.