$ bower install m43nu/angular-auto-height
Include it in your angular-app:
angular.module('myApp', [
// ...
'm43nu.auto-height'
]).
config(function () {
// ...
$ npm install angular-auto-height
Include it in your angular-app:
angular.module('myApp', [
// ...
require('angular-auto-height')
]).
config(function () {
// ...
$ Install-Package AngularAutoHeight
Include it in your angular-app:
angular.module('myApp', [
// ...
'm43nu.auto-height'
]).
config(function () {
// ...
##Use it in your html: ###Basic
<div class="parent">
<div class="sibling">I need some space too</div>
<div auto-height>
I stretch to the available height,
calculated from the height available from .parent and my siblings.
</div>
</div>
###Automatic recalculation of height:
<div id="parent">
<div id="sibling">I need some space too</div>
<div auto-height="recalculate-on-css-class-changes">
I stretch to the available height,
calculated from the height available from parent and my siblings.
Also, if the document changes height because of css class changes, I recalculate my height!
</div>
</div>
This is useful when dynamically changing the height of elements (e.g. when collapsing/expanding sections using http://angular-ui.github.io/bootstrap/#/collapse)
Note: This feature requires support of MutationObserver - see http://caniuse.com/#feat=mutationobserver
Just send me a message and I'll try to get to you as soon as possible.
Please submit a new issue.
- Fork angular-auto-height
- Create a topic branch -
git checkout -b my_branch
- Push to your branch -
git push origin my_branch
- Send me a pull-request for your topic branch
- That's it!
Released Under MIT License.