Can I use AngularUI jQuery PassThrough for WayPoints plugin?

I was going to try and write a directive for this jQuery WayPoints plugin http://imakewebthings.com/jquery-waypoints/#documentation

But then discovered AngularUI with jQuery Passthrough, which claims to support 75% of jQuery plugins. http://angular-ui.github.com/

Can someone please write an example of how I can use this jQuery WayPoints plugin in my AngularJS application?

+5
source share
2 answers

Here is a fiddle that seems to work using the Transcend AnglerUI jQuery Passthrough with Waypoints. Key notes:

1) angular -ui.js script ( AngularJS!)

2) ['ui']

angular.module('waypoints', ['ui']);

3) , , .

function WaypointsController($scope) {
    $scope.test = function(){
        alert('you have scrolled');
    }
}​

4) ui-jq, ui-options

<div ui-jq="waypoint" ui-options="test">
+13

:

3) , , .

function WaypointsController($scope) {
    $scope.test = function(direction){
        alert('you have scrolled ' + direction);
    };
    $scope.optionsObj = {
        offset: 50
        //additional options
    };
}​

4) ui-jq, ui-options

<div ui-jq="waypoint" ui-options="test, optionsObj">

- ,

+4

All Articles