src/directives/KbContainerController.js
function (kbItem) {
            var element = kbItem.element[0];
            var items = this._element.querySelectorAll('[kb-item]');
            for (var i = 0; i < items.length; i++) {
                var el = items.item(i);
                if (el === element) {
                    var siblings = {};
                    if (i !== 0) {
                        siblings.previous = angular.element(items.item(i - 1)).controller('kbItem');
                    }
                    if (i < items.length - 1) {
                        siblings.next = angular.element(items.item(i + 1)).controller('kbItem');
                    }
                    return siblings;
                }
            }
            return {};
        }
function (kbItem) {
            var element = kbItem.element[0];
            var items = this._element.querySelectorAll('[kb-item]');
            for (var i = 0; i < items.length; i++) {
                var el = items.item(i);
                if (el === element) {
                    var siblings = {};
                    if (i !== 0) {
                        siblings.previous = angular.element(items.item(i - 1)).controller('kbItem');
                    }
                    if (i < items.length - 1) {
                        siblings.next = angular.element(items.item(i + 1)).controller('kbItem');
                    }
                    return siblings;
                }
            }
            return {};
        }
function ( kbItem ) { var element = kbItem . element [ 0 ] ; var items = this . _element . querySelectorAll ( '[kb-item]' ) ; for ( var i = 0 ; i < items . length ; i ++ ) { var el = items . item ( i ) ; if ( el === element ) { var siblings = { } ; if ( i !== 0 ) { siblings . previous = angular . element ( items . item ( i - 1 ) ) . controller ( 'kbItem' ) ; } if ( i < items . length - 1 ) { siblings . next = angular . element ( items . item ( i + 1 ) ) . controller ( 'kbItem' ) ; } return siblings ; } } return { } ; }
Returns the element, controller and models from the current, prevous and next item.

@param {KbItemController} kbItem
@returns {Object} with up to 2 KbItemControllers: previous and next.
Returns the element controller and models from the current prevous and next item .