How can I solve the problem that IONIC pages cannot be rolled up when they are hidden at the bottom of the page?

Source: Internet
Author: User

How can I solve the problem that IONIC pages cannot be rolled up when they are hidden at the bottom of the page?

Ionic is currently the most promising HTML5 mobile app development framework. SASS is used to build applications. It provides many UI components to help developers develop powerful applications. It uses JavaScript MVVM framework and AngularJS to enhance applications. Provides two-way data binding, which can be used by Web and mobile developers.

Ionic features

1. ionic is easy to learn Based on Angular syntax. [3]

2. ionic is a lightweight framework.

3. ionic perfectly integrates the next-generation mobile framework and supports Angularjs features, MVVM, and easy code maintenance.

4. ionic provides a beautiful design. It builds applications through SASS. It provides many UI components to help developers develop powerful applications.

5. ionic focuses on native, so you cannot see the difference between hybrid applications and native applications.

6. ionic provides powerful command line tools.

7. ionic has superior performance and fast operation speed.

As the most popular framework at present, IONIC also encounters various strange problems during development, such as the following:

Problem description:

There is a button at the bottom of the page. Clicking this button will display some additional data, and the page will be exceeded and the scrolling effect is required. In the same scenario, the infinate Effect of ion-list is, however, the problem may occur occasionally and cannot be rolled. You can drag your finger up and release it, and then return to the original position. You cannot see the bottom data. This is because the ionic view does not recalculate the new height.

Solution

We need to apply a rolling proxy to ionic, called $ ionicScrollDelegate. We need to inject this proxy when using it.

this.$timeout(() => {this.$ionicScrollDelegate.resize();},410);

As shown above, the proxy has a method called resize (), that is, re-calculate the height. I added a timeout to ensure that the data is properly rendered and then resize.

The above is a solution to the problem that the bottom of the IONIC page is covered and cannot be rolled up. I hope it will help you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.