flaviusmatis / flaviusmatis/simplePagination.js
use simplePagination with AngularJS
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 397
- PR merge metrics
- No merged PRs in 30d
Description
```
--- jquery.simplePagination.js
+++ jquery.simplePagination.js
@@ -34,7 +34,9 @@
},
onInit: function() {
// Callback triggered immediately after initialization
- }
+ },
+ angularScpoe: '',
+ angularClick: ''
}, options || {});
var self = this;
@@ -229,7 +231,17 @@
$link = $('' + (options.text) + '');
} else {
$link = $('' + (options.text) + '');
+ if(o.angularScpoe) {
+ $link = $('' + (options.text) + '');
+ }
$link.click(function(event){
+ if(o.angularScpoe) {
+ var scope = angular.element($("#"+o.angularScpoe)).scope();
+ if(o.angularClick) {
+ var idx = pageIndex+1;
+ eval("scope."+o.angularClick+"("+idx+")");
+ }
+ }
return methods._selectPage.call(self, pageIndex, event);
});
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in jquery.simplePagination.js, reading the options setup and the pagination-link click handler shown in the issue. Check how the proposed angularScpoe and angularClick options interact with page selection, then verify that using the plugin with AngularJS invokes the requested callback with the selected page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angularjs, javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100