Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When is the appropriate to use ion-pane?

This is a simple enough question.

After taking a look at the documentation for ion-pane it states:

A simple container that fits content, with no side effects. Adds the ‘pane’ class to the element.

What does it mean when it states "no side effects"? What are the use cases for ion-pane?

like image 362
garrettmac Avatar asked Feb 10 '16 21:02

garrettmac


People also ask

What different layout does ionic framework provide?

Ionic Framework provides several different layouts that can be used to structure an app. From single page layouts, to split pane views and modals.

What is ion page?

The Ionic Page handles registering and displaying specific pages based on URLs. It's used underneath NavController so it will never have to be interacted with directly. When a new page is pushed with NavController , the URL is updated to match the path to this page.


2 Answers

Honestly, I never used ion-pane before, but this question intrigued me so I went searching. As it seems, and you can see on this Codepen: http://codepen.io/anon/pen/JGwJKv?editors=1010, if the content is too big (if you try to resize the browser window to very small) it will not show it. Opposed to the ion-content which will add scroll bars and allow you to use ion-refresher and some other options (tapping into scroll delegate, etc.).

So, to be honest, I never stumbled upon a need for such a use-case, so would probably never use ion-pane. The lacking documentation about it, kind of suggests the same...

like image 84
Nikola Avatar answered Oct 21 '22 08:10

Nikola


I actually used it for the first time on an app where I had dynamic divs that needed to fill the screen without adding scroll bars. Switching from ion-content to ion-pane did the trick for me.

like image 22
Jeremy Avatar answered Oct 21 '22 07:10

Jeremy