Maintains Ember.Component heights so that they fit vertically in the viewport.
ember install ember-fit-to-window
Elements that take up vertical space either above or below should have the
class ignore
so that the mixin ignores them in the calculation.
import Ember from 'ember';
import FitToWindow from 'ember-fit-to-window-mixin/mixins/fit-to-window';
export default Ember.Component.extend(FitToWindow, {
// optionally, you can specify the selector of the fixed-height DOM elements
fixedHeightSelector: '.whatever-you-like',
});
<div class="header ignore">...</div>
{{your-component}}
<div class="footer ignore">...</div>
git clone
this repositorynpm install
bower install
ember server
- Visit your app at http://localhost:4200.
npm test
(Runsember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.