Skip to content

Commit

Permalink
updated to ng version 2.3.1, updates in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
orizens committed Feb 15, 2017
1 parent 9f1c5c1 commit 8a6d94c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 50 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Inspired by [ng-infinite-scroll](https://github.com/sroze/ngInfiniteScroll) dire
Supports in Angular - **Final - 2.x.x**

## Angular Consulting Services
I'm a Senior Javascript Engineer & A Front End Consultant at (Orizens)[http://orizens.com].
I'm a Senior Javascript Engineer & A Front End Consultant at [Orizens](http://orizens.com).
My services include:
- consulting to companies and startups on how to approach code in their projects and keep it maintainable.
- I provide project bootstrapping and development - while afterwards, I integrate it on site and guide the team on it.
Expand All @@ -21,15 +21,15 @@ npm install angular2-infinite-scroll --save

## Supported API
Currently supported attributes:
* "infiniteScrollDistance" - (number), (optional, default: **2**) - should get a number, the number of viewport lenghts from the bottom of the page at which the event will be triggered.
* "infiniteScrollUpDistance" - (number), (optional, default: **1.5**) - should get a number
* "infiniteScrollThrottle" - (number), (optional, default: **300**) - should get a number of **milliseconds** for throttle. The event will be triggered this many milliseconds after the user *stops* scrolling.
* "infiniteScrollContainer" (string|HTMLElement), (optional, default: null) - should get a html element or css selector for a scrollable element; window or current element will be used if this attribute is empty.
* "scrolled" - (function) - this will callback if the distance threshold has been reached on a scroll down.
* "scrolledUp" - (function) (event: InfiniteScrollEvent) - this will callback if the distance threshold has been reached on a scroll up.
* "scrollWindow" - (boolean), (optional, default: **true**) - listens to the window scroll instead of the actual element scroll. this allows to invoke a callback function in the scope of the element while listenning to the window scroll.
* "immediateCheck" - (boolean), (optional, default: **false**) - invokes the handler immediately to check if a scroll event has been already triggred when the page has been loaded (i.e. - when you refresh a page that has been scrolled).
* "infiniteScrollDisabled" - (boolean), (optional, default: **false**) - doesn't invoke the handler if set to true
* **infiniteScrollDistance**<_number_> - (optional, default: **2**) - should get a number, the number of viewport lenghts from the bottom of the page at which the event will be triggered.
* **infiniteScrollUpDistance**<_number_> - (optional, default: **1.5**) - should get a number
* **infiniteScrollThrottle**<_number_> - (optional, default: **300**) - should get a number of **milliseconds** for throttle. The event will be triggered this many milliseconds after the user *stops* scrolling.
* **infiniteScrollContainer**<_string|HTMLElement_> - (optional, default: null) - should get a html element or css selector for a scrollable element; window or current element will be used if this attribute is empty.
* **scrolled**<_function_> - this will callback if the distance threshold has been reached on a scroll down.
* **scrolledUp**<_function_> - (event: InfiniteScrollEvent) - this will callback if the distance threshold has been reached on a scroll up.
* **scrollWindow**<_boolean_> - (optional, default: **true**) - listens to the window scroll instead of the actual element scroll. this allows to invoke a callback function in the scope of the element while listenning to the window scroll.
* **immediateCheck**<_boolean_> - (optional, default: **false**) - invokes the handler immediately to check if a scroll event has been already triggred when the page has been loaded (i.e. - when you refresh a page that has been scrolled).
* **infiniteScrollDisabled**<_boolean_> - (optional, default: **false**) - doesn't invoke the handler if set to true

## Behavior
By default, the directive listens to the **window scroll** event and invoked the callback.
Expand Down
54 changes: 26 additions & 28 deletions bundles/angular2-infinite-scroll.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
System.registerDynamic('src/infinite-scroll', ['@angular/core', './position-resolver', './scroll-register', './scroll-resolver'], true, function ($__require, exports, module) {
"use strict";

var define,
global = this || self,
var global = this || self,
GLOBAL = global;
var core_1 = $__require('@angular/core');
var position_resolver_1 = $__require('./position-resolver');
Expand Down Expand Up @@ -116,7 +115,9 @@ System.registerDynamic('src/infinite-scroll', ['@angular/core', './position-reso
selector: '[infinite-scroll]'
}] }];
/** @nocollapse */
InfiniteScroll.ctorParameters = [{ type: core_1.ElementRef }, { type: core_1.NgZone }, { type: position_resolver_1.PositionResolverFactory }, { type: scroll_register_1.ScrollRegister }, { type: scroll_resolver_1.ScrollResolver }];
InfiniteScroll.ctorParameters = function () {
return [{ type: core_1.ElementRef }, { type: core_1.NgZone }, { type: position_resolver_1.PositionResolverFactory }, { type: scroll_register_1.ScrollRegister }, { type: scroll_resolver_1.ScrollResolver }];
};
InfiniteScroll.propDecorators = {
'scrolled': [{ type: core_1.Output }],
'scrolledUp': [{ type: core_1.Output }],
Expand All @@ -134,13 +135,11 @@ System.registerDynamic('src/infinite-scroll', ['@angular/core', './position-reso
return InfiniteScroll;
}();
exports.InfiniteScroll = InfiniteScroll;
return module.exports;
});
System.registerDynamic('src/axis-resolver', ['@angular/core'], true, function ($__require, exports, module) {
"use strict";

var define,
global = this || self,
var global = this || self,
GLOBAL = global;
var core_1 = $__require('@angular/core');
var AxisResolverFactory = function () {
Expand All @@ -153,7 +152,9 @@ System.registerDynamic('src/axis-resolver', ['@angular/core'], true, function ($
};
AxisResolverFactory.decorators = [{ type: core_1.Injectable }];
/** @nocollapse */
AxisResolverFactory.ctorParameters = [];
AxisResolverFactory.ctorParameters = function () {
return [];
};
return AxisResolverFactory;
}();
exports.AxisResolverFactory = AxisResolverFactory;
Expand Down Expand Up @@ -188,13 +189,11 @@ System.registerDynamic('src/axis-resolver', ['@angular/core'], true, function ($
return AxisResolver;
}();
exports.AxisResolver = AxisResolver;
return module.exports;
});
System.registerDynamic('src/position-resolver', ['@angular/core', './axis-resolver'], true, function ($__require, exports, module) {
"use strict";

var define,
global = this || self,
var global = this || self,
GLOBAL = global;
var core_1 = $__require('@angular/core');
var axis_resolver_1 = $__require('./axis-resolver');
Expand All @@ -207,7 +206,9 @@ System.registerDynamic('src/position-resolver', ['@angular/core', './axis-resolv
};
PositionResolverFactory.decorators = [{ type: core_1.Injectable }];
/** @nocollapse */
PositionResolverFactory.ctorParameters = [{ type: axis_resolver_1.AxisResolverFactory }];
PositionResolverFactory.ctorParameters = function () {
return [{ type: axis_resolver_1.AxisResolverFactory }];
};
return PositionResolverFactory;
}();
exports.PositionResolverFactory = PositionResolverFactory;
Expand Down Expand Up @@ -295,13 +296,11 @@ System.registerDynamic('src/position-resolver', ['@angular/core', './axis-resolv
return PositionResolver;
}();
exports.PositionResolver = PositionResolver;
return module.exports;
});
System.registerDynamic('src/index', ['@angular/core', './infinite-scroll', './axis-resolver', './position-resolver', './scroll-register', './scroll-resolver'], true, function ($__require, exports, module) {
"use strict";

var define,
global = this || self,
var global = this || self,
GLOBAL = global;
var core_1 = $__require('@angular/core');
var infinite_scroll_1 = $__require('./infinite-scroll');
Expand All @@ -318,17 +317,17 @@ System.registerDynamic('src/index', ['@angular/core', './infinite-scroll', './ax
providers: [axis_resolver_1.AxisResolverFactory, position_resolver_1.PositionResolverFactory, scroll_register_1.ScrollRegister, scroll_resolver_1.ScrollResolver]
}] }];
/** @nocollapse */
InfiniteScrollModule.ctorParameters = [];
InfiniteScrollModule.ctorParameters = function () {
return [];
};
return InfiniteScrollModule;
}();
exports.InfiniteScrollModule = InfiniteScrollModule;
return module.exports;
});
System.registerDynamic('src/scroll-register', ['@angular/core', 'rxjs/Rx', 'rxjs/add/observable/fromEvent', 'rxjs/add/observable/timer', 'rxjs/add/observable/of', 'rxjs/add/operator/debounce', 'rxjs/add/operator/throttle', 'rxjs/add/operator/filter'], true, function ($__require, exports, module) {
"use strict";

var define,
global = this || self,
var global = this || self,
GLOBAL = global;
var core_1 = $__require('@angular/core');
var Rx_1 = $__require('rxjs/Rx');
Expand All @@ -350,19 +349,19 @@ System.registerDynamic('src/scroll-register', ['@angular/core', 'rxjs/Rx', 'rxjs
};
ScrollRegister.decorators = [{ type: core_1.Injectable }];
/** @nocollapse */
ScrollRegister.ctorParameters = [];
ScrollRegister.ctorParameters = function () {
return [];
};
return ScrollRegister;
}();
exports.ScrollRegister = ScrollRegister;
return module.exports;
});
System.registerDynamic("src/scroll-resolver", ["@angular/core"], true, function ($__require, exports, module) {
"use strict";

var define,
global = this || self,
var global = this || self,
GLOBAL = global;
var core_1 = $__require("@angular/core");
var core_1 = $__require('@angular/core');
var ScrollResolver = function () {
function ScrollResolver() {
this.lastScrollPosition = 0;
Expand Down Expand Up @@ -392,17 +391,17 @@ System.registerDynamic("src/scroll-resolver", ["@angular/core"], true, function
};
ScrollResolver.decorators = [{ type: core_1.Injectable }];
/** @nocollapse */
ScrollResolver.ctorParameters = [];
ScrollResolver.ctorParameters = function () {
return [];
};
return ScrollResolver;
}();
exports.ScrollResolver = ScrollResolver;
return module.exports;
});
System.registerDynamic('angular2-infinite-scroll', ['./src/infinite-scroll', './src/position-resolver', './src/axis-resolver', './src/index', './src/scroll-register', './src/scroll-resolver'], true, function ($__require, exports, module) {
"use strict";

var define,
global = this || self,
var global = this || self,
GLOBAL = global;
var infinite_scroll_1 = $__require('./src/infinite-scroll');
var position_resolver_1 = $__require('./src/position-resolver');
Expand All @@ -425,5 +424,4 @@ System.registerDynamic('angular2-infinite-scroll', ['./src/infinite-scroll', './
exports.default = {
directives: [infinite_scroll_1.InfiniteScroll, axis_resolver_1.AxisResolver, position_resolver_1.PositionResolver]
};
return module.exports;
});
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@
"author": "Oren Farhi",
"license": "MIT",
"devDependencies": {
"@angular/common": "2.0.1",
"@angular/compiler": "2.0.1",
"@angular/compiler-cli": "^0.6.2",
"@angular/core": "2.0.1",
"@angular/platform-browser": "2.0.1",
"@angular/platform-browser-dynamic": "2.0.1",
"@types/core-js": "^0.9.32",
"@types/jasmine": "^2.2.33",
"@types/node": "^6.0.38",
"@angular/common": "2.3.1",
"@angular/compiler": "2.3.1",
"@angular/compiler-cli": "2.3.1",
"@angular/core": "2.3.1",
"@angular/platform-browser": "2.3.1",
"@angular/platform-browser-dynamic": "2.3.1",
"@types/core-js": "0.9.32",
"@types/jasmine": "2.2.33",
"@types/node": "6.0.38",
"autodts": "0.0.6",
"awesome-typescript-loader": "^2.2.4",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"awesome-typescript-loader": "2.2.4",
"es6-promise": "3.0.2",
"es6-shim": "0.33.3",
"istanbul-instrumenter-loader": "^1.0.0",
"jasmine-core": "2.4.1",
"karma": "^0.13.22",
Expand Down

0 comments on commit 8a6d94c

Please sign in to comment.