Use JQUERY paging control _ ANGULARJS in AngularJS

Source: Internet
Author: User
This article describes how to use JQUERY paging controls in ANGULARJS. If you need JQUERY paging controls, you can refer to the first article. If you don't know what to write, please come and think about it. I hope you can discuss it together.

Paging is a common function of front-end data display. In Angular js we use, native paging requires that all data be retrieved to the front-end, and then to the front-end paging, it is not practical to operate large volumes of data. Next, I will introduce how to change a jquery paging control to an Angularjs command.

First, reference the jquery1.10 and Angularjs library files and the jq-pagination control in the web project.

The command name is custompagination, And the Html style is added for the command.

Then add the corresponding controller to the command.

The html page code is as follows:

The method for obtaining the corresponding controller data is

Controls.

Note: jquery controls use a synchronous method, while Angularjs uses an asynchronous method to obtain background data, when using jquery and Angularjs at the same time, you need to combine the two different programming ideas. In this example, the biggest problem is how to notify the jquery paging control of the new paging status after obtaining background data using Angularjs, And then refresh the page data of the paging control. In this example, callback is performed in Angularjs and jquery code. In fact, you can also use watch in the Angularjs command to monitor the changes in the page control data to refresh the page. You are welcome to explore it further.

Related Article

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.