Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set height dynamically #43

Open
naveenkumarkg19 opened this issue Aug 30, 2017 · 3 comments
Open

How to set height dynamically #43

naveenkumarkg19 opened this issue Aug 30, 2017 · 3 comments

Comments

@naveenkumarkg19
Copy link

I am using it in ionic 2 , everything works fine . but at one page i need to set it to half page of the screen . How is it possible . I was able to achieve partially by removing ion-content and placing the ion-grid . nothing seems to be perfect . any idea ?

@arielfaur
Copy link
Owner

arielfaur commented Aug 31, 2017

@naveenkumarkg19 You could use the maxHeight property:

<ion-pullup (onExpand)="footerExpanded()" (onCollapse)="footerCollapsed()" [(state)]="footerState" [maxHeight]="getMaximumHeight()">

Then in your code simply calculate the window height:

getMaximumHeight() {
    return window.innerHeight / 2;
}

I just tried it and it works.

@PandaBearz
Copy link

Thank You Some Much For This, You Saved Me So Much Time, I Just Wanted To Let You Know I Really Appreciate This Sire!

@jobintweets
Copy link

Thank you so much... I have spend 3 hours googling for this....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants