Angular2 or heigher directive that will calculate the height to for a given element so that it will fill the whole window according to its offsetTop and make it scrollable.
npm install ngx-fill-heightAngular fill-height directive
====
Angular directive to change the height of a div to fill the available space in the window and make is scrollable.
Usage
----
Run
npm install ngx-fill-height
Import FillHeightModule to your app.
Example
...
import { FillHeightModule } from 'ngx-fill-height/fill-height.module';
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
FillHeightModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Add fill-height directive to any block element.
Example
Optionally add consider footer element by passing the elementRef of the footer
Live demo: https://arthurvaverko.github.io/ngx-fill-height/
Contribution
----
Frok and clone then run
npm install
This repo is based on Angular-cli.
To run a live development srver run
ng serve
Note the demo is part of the repo and the dist folder is used for the example page so before commit use
ng build --base-href ngx-fill-height
Commit to the Github-Pages branch any chages in the example component:
cd
* Inspierd by: https://github.com/anthonychu/angular-fill-height-directive