diff --git a/.DS_Store b/.DS_Store
index 4ae16bf..e28886a 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..59d9a3a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,16 @@
+# Editor configuration, see https://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.ts]
+quote_type = single
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..520c645
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,43 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# Compiled output
+/dist
+/tmp
+/out-tsc
+/bazel-out
+
+# Node
+/node_modules
+npm-debug.log
+yarn-error.log
+*node_modules*
+
+# IDEs and editors
+.idea/
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# Visual Studio Code
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+.history/*
+
+# Miscellaneous
+/.angular/cache
+.sass-cache/
+/connect.lock
+/coverage
+/libpeerconnection.log
+testem.log
+/typings
+
+# System files
+.DS_Store
+Thumbs.db
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..43c97e7
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+package-lock=false
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..77b3745
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,4 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
+ "recommendations": ["angular.ng-template"]
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..740e35a
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,20 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "ng serve",
+ "type": "pwa-chrome",
+ "request": "launch",
+ "preLaunchTask": "npm: start",
+ "url": "http://localhost:4200/"
+ },
+ {
+ "name": "ng test",
+ "type": "chrome",
+ "request": "launch",
+ "preLaunchTask": "npm: test",
+ "url": "http://localhost:9876/debug.html"
+ }
+ ]
+}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 0000000..a298b5b
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,42 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "type": "npm",
+ "script": "start",
+ "isBackground": true,
+ "problemMatcher": {
+ "owner": "typescript",
+ "pattern": "$tsc",
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": {
+ "regexp": "(.*?)"
+ },
+ "endsPattern": {
+ "regexp": "bundle generation complete"
+ }
+ }
+ }
+ },
+ {
+ "type": "npm",
+ "script": "test",
+ "isBackground": true,
+ "problemMatcher": {
+ "owner": "typescript",
+ "pattern": "$tsc",
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": {
+ "regexp": "(.*?)"
+ },
+ "endsPattern": {
+ "regexp": "bundle generation complete"
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..730b1f5
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,67 @@
+# Contribute
+
+## Introduction
+
+First, thank you for considering contributing to ngx-infinite-scroll! It's people like you that make the open source community such a great community! 😊
+
+We welcome any type of contribution, not only code. You can help with
+- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
+- **Marketing**: writing blog posts, howto's, printing stickers, ...
+- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
+- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
+- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/ngx-infinite-scroll).
+
+## Your First Contribution
+
+Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
+
+## Submitting code
+
+Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
+
+## Code review process
+
+The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
+It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
+
+## Financial contributions
+
+We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/ngx-infinite-scroll).
+Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
+
+## Questions
+
+If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!).
+You can also reach us at hello@ngx-infinite-scroll.opencollective.com.
+
+## Credits
+
+### Contributors
+
+Thank you to all the people who have already contributed to ngx-infinite-scroll!
+
+
+
+### Backers
+
+Thank you to all our backers! [[Become a backer](https://opencollective.com/ngx-infinite-scroll#backer)]
+
+
+
+
+### Sponsors
+
+Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/ngx-infinite-scroll#sponsor))
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Development Instructions.md b/Development Instructions.md
new file mode 100644
index 0000000..c91d79c
--- /dev/null
+++ b/Development Instructions.md
@@ -0,0 +1,27 @@
+# Development
+
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.1.3.
+
+## Development server
+
+Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..28cd204
--- /dev/null
+++ b/README.md
@@ -0,0 +1,278 @@
+[](https://travis-ci.org/orizens/ngx-infinite-scroll) [](#backers) [](#sponsors)
+[](https://badge.fury.io/js/ngx-infinite-scroll)
+[](https://badge.fury.io/js/ngx-infinite-scroll)
+[](https://img.shields.io/npm/dm/ngx-infinite-scroll.svg)
+[](https://img.shields.io/npm/dt/ngx-infinite-scroll.svg)
+
+## [Consider Becoming a sponsor](https://opencollective.com/ngx-infinite-scroll#sponsor)
+
+# Angular Infinite Scroll
+
+versions now follow Angular's version to easily reflect compatibility.
+Meaning, for **Angular 10**, use `ngx-infinite-scroll @ ^10.0.0`
+
+## Angular - Older Versions Support
+
+Starting **Angular 6 and Above** - `ngx-infinite-scroll@THE_VERSION.0.0`
+For **Angular 4** and **Angular = ^5.5.6** - use version `ngx-infinite-scroll@0.8.4`
+For **Angular 5.x** with **rxjs =<5.5.2** - use version `ngx-infinite-scroll@0.8.3`
+For Angular version **<= 2.3.1**, you can use `npm i angular2-infinite-scroll` (latest version is 0.3.42) - please notice **the angular2-infinite-scroll** package is deprecated
+
+## Used By
+
+- [Google](https://google.com)
+- [Apple](https://apple.com)
+- [Amazon](https://amazon.com)
+- [Microsoft](https://microsoft.com)
+- [Disney](https://disney.com)
+- [Sap](https://sap.com/)
+- [Cisco](https://cisco.com/)
+- [Yandex](https://yandex.com)
+- [Ancestry](https://www.ancestry.com/)
+
+and much more.
+
+> _These analytics are made available via the awesome [Scarf](https://www.npmjs.com/package/@scarf/scarf) package analytics library_
+
+### Opt-Out Of Scarf
+
+Scarf can be disabled by following [these directions](https://github.com/orizens/ngx-infinite-scroll/issues/352#issuecomment-742009046)
+
+## Front End Consulting Services
+
+I'm a Senior Front End Engineer & Consultant at [Orizens](https://orizens.com).
+My services include:
+
+- Angular/React/Javascript Consulting
+- Front End Architecture Consulting
+- Project Code Review
+- Project Development
+
+[Contact Here](http://orizens.com/contact)
+
+
+
+
+
+## Installation
+
+```
+npm install ngx-infinite-scroll --save
+```
+
+## Supported API
+
+### Properties
+
+| @Input() | Type | Required | Default | Description |
+| ------------------------ | -------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| infiniteScrollDistance | number | optional | 2 | the bottom percentage point of the scroll nob relatively to the infinite-scroll container (i.e, 2 (2 \* 10 = 20%) is event is triggered when 80% (100% - 20%) has been scrolled). if container.height is 900px, when the container is scrolled to or past the 720px, it will fire the scrolled event. |
+| infiniteScrollUpDistance | number | optional | 1.5 | should get a number |
+| infiniteScrollThrottle | number | optional | 150 | should get a number of **milliseconds** for throttle. The event will be triggered this many milliseconds after the user _stops_ scrolling. |
+| scrollWindow | boolean | optional | 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 | 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 | false | doesn't invoke the handler if set to true |
+| horizontal | boolean | optional | false | sets the scroll to listen for horizontal events |
+| alwaysCallback | boolean | optional | false | instructs the scroller to always trigger events |
+| infiniteScrollContainer | string / HTMLElement | optional | 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. |
+| fromRoot | boolean | optional | false | if **infiniteScrollContainer** is set, this instructs the scroller to query the container selector from the root of the **document** object. |
+
+### Events
+
+| @Output() | Type | Event Type | Required | Description |
+| ---------- | ------------ | -------------------- | -------- | ------------------------------------------------------------------------------- |
+| scrolled | EventEmitter | IInfiniteScrollEvent | optional | this will callback if the distance threshold has been reached on a scroll down. |
+| scrolledUp | EventEmitter | IInfiniteScrollEvent | optional | this will callback if the distance threshold has been reached on a scroll up. |
+
+## Behavior
+
+By default, the directive listens to the **window scroll** event and invoked the callback.
+**To trigger the callback when the actual element is scrolled**, these settings should be configured:
+
+- [scrollWindow]="false"
+- set an explict css "height" value to the element
+
+## DEMO
+
+[Try the Demo in StackBlitz](https://stackblitz.com/edit/ngx-infinite-scroll)
+
+## Usage
+
+First, import the InfiniteScrollModule to your module:
+
+```typescript
+import { NgModule } from '@angular/core';
+import { BrowserModule } from '@angular/platform-browser';
+import { InfiniteScrollModule } from 'ngx-infinite-scroll';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+import { AppComponent } from './app';
+
+@NgModule({
+ imports: [BrowserModule, InfiniteScrollModule],
+ declarations: [AppComponent],
+ bootstrap: [AppComponent],
+})
+export class AppModule {}
+
+platformBrowserDynamic().bootstrapModule(AppModule);
+```
+
+In this example, the **onScroll** callback will be invoked when the window is scrolled down:
+
+```typescript
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app',
+ template: `
+
+ `,
+})
+export class AppComponent {
+ onScroll() {
+ console.log('scrolled!!');
+ }
+}
+```
+
+in this example, whenever the "search-results" is scrolled, the callback will be invoked:
+
+```typescript
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app',
+ styles: [
+ `
+ .search-results {
+ height: 20rem;
+ overflow: scroll;
+ }
+ `,
+ ],
+ template: `
+
+ `,
+})
+export class AppComponent {
+ onScroll() {
+ console.log('scrolled!!');
+ }
+}
+```
+
+In this example, the **onScrollDown** callback will be invoked when the window is scrolled down and the **onScrollUp** callback will be invoked when the window is scrolled up:
+
+```typescript
+import { Component } from '@angular/core';
+import { InfiniteScroll } from 'ngx-infinite-scroll';
+
+@Component({
+ selector: 'app',
+ directives: [InfiniteScroll],
+ template: `
+
+ `,
+})
+export class AppComponent {
+ onScrollDown() {
+ console.log('scrolled down!!');
+ }
+
+ onScrollUp() {
+ console.log('scrolled up!!');
+ }
+}
+```
+
+In this example, the **infiniteScrollContainer** attribute is used to point directive to the scrollable container using a css selector. **fromRoot** is used to determine whether the scroll container has to be searched within the whole document (`[fromRoot]="true"`) or just inside the **infiniteScroll** directive (`[fromRoot]="false"`, default option).
+
+```typescript
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app',
+ styles: [
+ `
+ .main-panel {
+ height: 100px;
+ overflow-y: scroll;
+ }
+ `,
+ ],
+ template: `
+
+
+
+ `,
+})
+export class AppComponent {
+ selector: string = '.main-panel';
+
+ onScroll() {
+ console.log('scrolled!!');
+ }
+}
+```
+
+It is also possible to use **infiniteScrollContainer** without additional variable by using single quotes inside double quotes:
+
+```
+[infiniteScrollContainer]="'.main-panel'"
+```
+
+# Showcase Examples
+
+- [Echoes Player - Developed with Angular, angular-cli and ngrx](http://orizens.github.io/echoes-player) ([github repo for echoes player](http://github.com/orizens/echoes-player))
+
+## Contributors
+
+This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
+
+
+## Backers
+
+Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/ngx-infinite-scroll#backer)]
+
+
+
+## Sponsors
+
+
+
+
+
+
+
+
+
+
+
diff --git a/angular.json b/angular.json
new file mode 100644
index 0000000..d7a2011
--- /dev/null
+++ b/angular.json
@@ -0,0 +1,137 @@
+{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "newProjectRoot": "projects",
+ "projects": {
+ "ngx-infinite-scroll": {
+ "projectType": "library",
+ "root": "projects/ngx-infinite-scroll",
+ "sourceRoot": "projects/ngx-infinite-scroll/src",
+ "prefix": "lib",
+ "architect": {
+ "build": {
+ "builder": "@angular-devkit/build-angular:ng-packagr",
+ "options": {
+ "project": "projects/ngx-infinite-scroll/ng-package.json"
+ },
+ "configurations": {
+ "production": {
+ "tsConfig": "projects/ngx-infinite-scroll/tsconfig.lib.prod.json"
+ },
+ "development": {
+ "tsConfig": "projects/ngx-infinite-scroll/tsconfig.lib.json"
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "test": {
+ "builder": "@angular-devkit/build-angular:karma",
+ "options": {
+ "main": "projects/ngx-infinite-scroll/src/test.ts",
+ "tsConfig": "projects/ngx-infinite-scroll/tsconfig.spec.json",
+ "karmaConfig": "projects/ngx-infinite-scroll/karma.conf.js"
+ }
+ }
+ }
+ },
+ "demo": {
+ "projectType": "application",
+ "schematics": {
+ "@schematics/angular:application": {
+ "strict": true
+ }
+ },
+ "root": "projects/demo",
+ "sourceRoot": "projects/demo/src",
+ "prefix": "app",
+ "architect": {
+ "build": {
+ "builder": "@angular-devkit/build-angular:browser",
+ "options": {
+ "outputPath": "dist/demo",
+ "index": "projects/demo/src/index.html",
+ "main": "projects/demo/src/main.ts",
+ "polyfills": "projects/demo/src/polyfills.ts",
+ "tsConfig": "projects/demo/tsconfig.app.json",
+ "assets": [
+ "projects/demo/src/favicon.ico",
+ "projects/demo/src/assets"
+ ],
+ "styles": [
+ "projects/demo/src/styles.css"
+ ],
+ "scripts": []
+ },
+ "configurations": {
+ "production": {
+ "budgets": [
+ {
+ "type": "initial",
+ "maximumWarning": "500kb",
+ "maximumError": "1mb"
+ },
+ {
+ "type": "anyComponentStyle",
+ "maximumWarning": "2kb",
+ "maximumError": "4kb"
+ }
+ ],
+ "fileReplacements": [
+ {
+ "replace": "projects/demo/src/environments/environment.ts",
+ "with": "projects/demo/src/environments/environment.prod.ts"
+ }
+ ],
+ "outputHashing": "all"
+ },
+ "development": {
+ "buildOptimizer": false,
+ "optimization": false,
+ "vendorChunk": true,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "namedChunks": true
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "builder": "@angular-devkit/build-angular:dev-server",
+ "configurations": {
+ "production": {
+ "browserTarget": "demo:build:production"
+ },
+ "development": {
+ "browserTarget": "demo:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
+ },
+ "extract-i18n": {
+ "builder": "@angular-devkit/build-angular:extract-i18n",
+ "options": {
+ "browserTarget": "demo:build"
+ }
+ },
+ "test": {
+ "builder": "@angular-devkit/build-angular:karma",
+ "options": {
+ "main": "projects/demo/src/test.ts",
+ "polyfills": "projects/demo/src/polyfills.ts",
+ "tsConfig": "projects/demo/tsconfig.spec.json",
+ "karmaConfig": "projects/demo/karma.conf.js",
+ "assets": [
+ "projects/demo/src/favicon.ico",
+ "projects/demo/src/assets"
+ ],
+ "styles": [
+ "projects/demo/src/styles.css"
+ ],
+ "scripts": []
+ }
+ }
+ }
+ }
+ },
+ "defaultProject": "ngx-infinite-scroll"
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..d7e8bfc
--- /dev/null
+++ b/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "orizens-ng",
+ "version": "0.0.0",
+ "scripts": {
+ "ng": "ng",
+ "start": "ng serve",
+ "build": "ng build",
+ "watch": "ng build --watch --configuration development",
+ "test": "ng test",
+ "publish-lib": "npm publish --tag latest ./dist/ngx-infinite-scroll",
+ "publish:beta": "npm publish --tag next ./dist/ngx-infinite-scroll"
+ },
+ "private": true,
+ "dependencies": {
+ "@angular/animations": "~13.1.0",
+ "@angular/common": "~13.1.0",
+ "@angular/compiler": "~13.1.0",
+ "@angular/core": "~13.1.0",
+ "@angular/forms": "~13.1.0",
+ "@angular/platform-browser": "~13.1.0",
+ "@angular/platform-browser-dynamic": "~13.1.0",
+ "@angular/router": "~13.1.0",
+ "@scarf/scarf": "^1.1.1",
+ "rxjs": "~7.4.0",
+ "tslib": "^2.3.0",
+ "zone.js": "~0.11.4"
+ },
+ "devDependencies": {
+ "@angular-devkit/build-angular": "~13.1.3",
+ "@angular/cli": "~13.1.3",
+ "@angular/compiler-cli": "~13.1.0",
+ "@types/jasmine": "~3.10.0",
+ "@types/node": "^12.11.1",
+ "jasmine-core": "~3.10.0",
+ "karma": "~6.3.0",
+ "karma-chrome-launcher": "~3.1.0",
+ "karma-coverage": "~2.1.0",
+ "karma-jasmine": "~4.0.0",
+ "karma-jasmine-html-reporter": "~1.7.0",
+ "ng-packagr": "^13.0.0",
+ "typescript": "~4.5.2"
+ }
+}
diff --git a/projects/demo/.browserslistrc b/projects/demo/.browserslistrc
new file mode 100644
index 0000000..4f9ac26
--- /dev/null
+++ b/projects/demo/.browserslistrc
@@ -0,0 +1,16 @@
+# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
+# For additional information regarding the format and rule options, please see:
+# https://github.com/browserslist/browserslist#queries
+
+# For the full list of supported browsers by the Angular framework, please see:
+# https://angular.io/guide/browser-support
+
+# You can see what browsers were selected by your queries by running:
+# npx browserslist
+
+last 1 Chrome version
+last 1 Firefox version
+last 2 Edge major versions
+last 2 Safari major versions
+last 2 iOS major versions
+Firefox ESR
diff --git a/projects/demo/karma.conf.js b/projects/demo/karma.conf.js
new file mode 100644
index 0000000..9486318
--- /dev/null
+++ b/projects/demo/karma.conf.js
@@ -0,0 +1,44 @@
+// Karma configuration file, see link for more information
+// https://karma-runner.github.io/1.0/config/configuration-file.html
+
+module.exports = function (config) {
+ config.set({
+ basePath: '',
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
+ plugins: [
+ require('karma-jasmine'),
+ require('karma-chrome-launcher'),
+ require('karma-jasmine-html-reporter'),
+ require('karma-coverage'),
+ require('@angular-devkit/build-angular/plugins/karma')
+ ],
+ client: {
+ jasmine: {
+ // you can add configuration options for Jasmine here
+ // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
+ // for example, you can disable the random execution with `random: false`
+ // or set a specific seed with `seed: 4321`
+ },
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
+ },
+ jasmineHtmlReporter: {
+ suppressAll: true // removes the duplicated traces
+ },
+ coverageReporter: {
+ dir: require('path').join(__dirname, '../../coverage/demo'),
+ subdir: '.',
+ reporters: [
+ { type: 'html' },
+ { type: 'text-summary' }
+ ]
+ },
+ reporters: ['progress', 'kjhtml'],
+ port: 9876,
+ colors: true,
+ logLevel: config.LOG_INFO,
+ autoWatch: true,
+ browsers: ['Chrome'],
+ singleRun: false,
+ restartOnFileChange: true
+ });
+};
diff --git a/projects/demo/src/app/app.component.css b/projects/demo/src/app/app.component.css
new file mode 100644
index 0000000..e69de29
diff --git a/projects/demo/src/app/app.component.html b/projects/demo/src/app/app.component.html
new file mode 100644
index 0000000..9e6c08a
--- /dev/null
+++ b/projects/demo/src/app/app.component.html
@@ -0,0 +1,347 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/projects/demo/src/app/app.component.spec.ts b/projects/demo/src/app/app.component.spec.ts
new file mode 100644
index 0000000..127bbea
--- /dev/null
+++ b/projects/demo/src/app/app.component.spec.ts
@@ -0,0 +1,31 @@
+import { TestBed } from '@angular/core/testing';
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [
+ AppComponent
+ ],
+ }).compileComponents();
+ });
+
+ it('should create the app', () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.componentInstance;
+ expect(app).toBeTruthy();
+ });
+
+ it(`should have as title 'demo'`, () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.componentInstance;
+ expect(app.title).toEqual('demo');
+ });
+
+ it('should render title', () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ fixture.detectChanges();
+ const compiled = fixture.nativeElement as HTMLElement;
+ expect(compiled.querySelector('.content span')?.textContent).toContain('demo app is running!');
+ });
+});
diff --git a/projects/demo/src/app/app.component.ts b/projects/demo/src/app/app.component.ts
new file mode 100644
index 0000000..603787d
--- /dev/null
+++ b/projects/demo/src/app/app.component.ts
@@ -0,0 +1,70 @@
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.css'],
+})
+export class AppComponent {
+ title = 'demo';
+ array: string[] = [];
+ sum = 100;
+ throttle = 300;
+ scrollDistance = 1;
+ scrollUpDistance = 2;
+ direction = '';
+ modalOpen = false;
+
+ // nisVersion = nisPackage.dependencies["ngx-infinite-scroll"];
+
+ constructor() {
+ this.appendItems(0, this.sum);
+ }
+
+ addItems(startIndex: number, endIndex: number, _method: 'push' | 'unshift') {
+ for (let i = 0; i < this.sum; ++i) {
+ const value = [i, ' ', this.generateWord()].join('');
+ if (_method === 'push') {
+ this.array.push(value);
+ } else {
+ this.array.unshift(value);
+ }
+ }
+ }
+
+ appendItems(startIndex: number, endIndex: number) {
+ this.addItems(startIndex, endIndex, 'push');
+ }
+
+ prependItems(startIndex: number, endIndex: number) {
+ this.addItems(startIndex, endIndex, 'unshift');
+ }
+
+ onScrollDown() {
+ // console.log('scrolled down!!', ev);
+
+ // add another 20 items
+ const start = this.sum;
+ this.sum += 20;
+ this.appendItems(start, this.sum);
+
+ this.direction = 'down';
+ }
+
+ onUp() {
+ // console.log('scrolled up!', ev);
+ const start = this.sum;
+ this.sum += 20;
+ this.prependItems(start, this.sum);
+
+ this.direction = 'up';
+ }
+ generateWord() {
+ return Math.random() * 3342411313;
+ // return chance.word();
+ }
+
+ toggleModal() {
+ this.modalOpen = !this.modalOpen;
+ }
+}
diff --git a/projects/demo/src/app/app.module.ts b/projects/demo/src/app/app.module.ts
new file mode 100644
index 0000000..a6c83bd
--- /dev/null
+++ b/projects/demo/src/app/app.module.ts
@@ -0,0 +1,14 @@
+import { NgModule } from '@angular/core';
+import { BrowserModule } from '@angular/platform-browser';
+
+import { AppComponent } from './app.component';
+import { InfiniteScrollModule } from 'ngx-infinite-scroll';
+import { ModalComponent } from './modal/modal.component';
+
+@NgModule({
+ declarations: [AppComponent, ModalComponent],
+ imports: [BrowserModule, InfiniteScrollModule],
+ providers: [],
+ bootstrap: [AppComponent],
+})
+export class AppModule {}
diff --git a/projects/demo/src/app/modal/modal.component.ts b/projects/demo/src/app/modal/modal.component.ts
new file mode 100644
index 0000000..8673d58
--- /dev/null
+++ b/projects/demo/src/app/modal/modal.component.ts
@@ -0,0 +1,69 @@
+import { Component, Output, EventEmitter } from '@angular/core';
+
+@Component({
+ selector: 'modal',
+ templateUrl: './modal.html',
+})
+export class ModalComponent {
+ @Output() onClose = new EventEmitter();
+
+ array: number[] = [];
+ sum = 100;
+
+ modalIsOpen = '';
+ modalTitle = 'scroll to update';
+ modalBody = modalText;
+
+ modalScrollDistance = 2;
+ modalScrollThrottle = 50;
+
+ constructor() {
+ for (let i = 0; i < this.sum; ++i) {
+ this.array.push(i);
+ }
+ this.open();
+ }
+
+ onScrollDown() {
+ console.log('scrolled!!');
+
+ // add another 20 items
+ const start = this.sum;
+ this.sum += 20;
+ for (let i = start; i < this.sum; ++i) {
+ this.array.push(i);
+ }
+ }
+
+ onModalScrollDown() {
+ this.modalTitle = 'updated on ' + new Date().toString();
+ this.modalBody += modalText;
+ }
+ open() {
+ this.modalIsOpen = 'in modal-open';
+ }
+
+ close() {
+ this.modalIsOpen = '';
+ this.modalBody = modalText;
+ this.onClose.emit();
+ }
+}
+
+var modalText = `Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
+
+Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
+
+Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.
+
+Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
+
+Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
+
+Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.
+
+Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
+
+Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
+
+Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.`;
diff --git a/projects/demo/src/app/modal/modal.html b/projects/demo/src/app/modal/modal.html
new file mode 100644
index 0000000..75e6c0e
--- /dev/null
+++ b/projects/demo/src/app/modal/modal.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
{{ modalTitle }}
+
+
+
+ {{ modalBody }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/demo/src/assets/.gitkeep b/projects/demo/src/assets/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/projects/demo/src/environments/environment.prod.ts b/projects/demo/src/environments/environment.prod.ts
new file mode 100644
index 0000000..3612073
--- /dev/null
+++ b/projects/demo/src/environments/environment.prod.ts
@@ -0,0 +1,3 @@
+export const environment = {
+ production: true
+};
diff --git a/projects/demo/src/environments/environment.ts b/projects/demo/src/environments/environment.ts
new file mode 100644
index 0000000..f56ff47
--- /dev/null
+++ b/projects/demo/src/environments/environment.ts
@@ -0,0 +1,16 @@
+// This file can be replaced during build by using the `fileReplacements` array.
+// `ng build` replaces `environment.ts` with `environment.prod.ts`.
+// The list of file replacements can be found in `angular.json`.
+
+export const environment = {
+ production: false
+};
+
+/*
+ * For easier debugging in development mode, you can import the following file
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
+ *
+ * This import should be commented out in production mode because it will have a negative impact
+ * on performance if an error is thrown.
+ */
+// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
diff --git a/projects/demo/src/favicon.ico b/projects/demo/src/favicon.ico
new file mode 100644
index 0000000..997406a
Binary files /dev/null and b/projects/demo/src/favicon.ico differ
diff --git a/projects/demo/src/index.html b/projects/demo/src/index.html
new file mode 100644
index 0000000..f9f06e7
--- /dev/null
+++ b/projects/demo/src/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+ Demo
+
+
+
+
+
+
+
+
diff --git a/projects/demo/src/main.ts b/projects/demo/src/main.ts
new file mode 100644
index 0000000..c7b673c
--- /dev/null
+++ b/projects/demo/src/main.ts
@@ -0,0 +1,12 @@
+import { enableProdMode } from '@angular/core';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+ enableProdMode();
+}
+
+platformBrowserDynamic().bootstrapModule(AppModule)
+ .catch(err => console.error(err));
diff --git a/projects/demo/src/polyfills.ts b/projects/demo/src/polyfills.ts
new file mode 100644
index 0000000..429bb9e
--- /dev/null
+++ b/projects/demo/src/polyfills.ts
@@ -0,0 +1,53 @@
+/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ * file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes recent versions of Safari, Chrome (including
+ * Opera), Edge on the desktop, and iOS and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/guide/browser-support
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/**
+ * By default, zone.js will patch all possible macroTask and DomEvents
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
+ * because those flags need to be set before `zone.js` being loaded, and webpack
+ * will put import in the top of bundle, so user need to create a separate file
+ * in this directory (for example: zone-flags.ts), and put the following flags
+ * into that file, and then add the following code before importing zone.js.
+ * import './zone-flags';
+ *
+ * The flags allowed in zone-flags.ts are listed here.
+ *
+ * The following flags will work for all browsers.
+ *
+ * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
+ * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
+ * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
+ *
+ * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
+ * with the following flag, it will bypass `zone.js` patch for IE/Edge
+ *
+ * (window as any).__Zone_enable_cross_context_check = true;
+ *
+ */
+
+/***************************************************************************************************
+ * Zone JS is required by default for Angular itself.
+ */
+import 'zone.js'; // Included with Angular CLI.
+
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
diff --git a/projects/demo/src/styles.css b/projects/demo/src/styles.css
new file mode 100644
index 0000000..90d4ee0
--- /dev/null
+++ b/projects/demo/src/styles.css
@@ -0,0 +1 @@
+/* You can add global styles to this file, and also import other style files */
diff --git a/projects/demo/src/test.ts b/projects/demo/src/test.ts
new file mode 100644
index 0000000..00025da
--- /dev/null
+++ b/projects/demo/src/test.ts
@@ -0,0 +1,26 @@
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/testing';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+declare const require: {
+ context(path: string, deep?: boolean, filter?: RegExp): {
+ (id: string): T;
+ keys(): string[];
+ };
+};
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting(),
+);
+
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);
diff --git a/projects/demo/tsconfig.app.json b/projects/demo/tsconfig.app.json
new file mode 100644
index 0000000..591adc0
--- /dev/null
+++ b/projects/demo/tsconfig.app.json
@@ -0,0 +1,17 @@
+/* To learn more about this file see: https://angular.io/config/tsconfig. */
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../out-tsc/app",
+ "types": [],
+ "noImplicitAny": false,
+ "strict": false,
+ },
+ "files": [
+ "src/main.ts",
+ "src/polyfills.ts"
+ ],
+ "include": [
+ "src/**/*.d.ts"
+ ]
+}
diff --git a/projects/demo/tsconfig.spec.json b/projects/demo/tsconfig.spec.json
new file mode 100644
index 0000000..b66a2f0
--- /dev/null
+++ b/projects/demo/tsconfig.spec.json
@@ -0,0 +1,18 @@
+/* To learn more about this file see: https://angular.io/config/tsconfig. */
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../out-tsc/spec",
+ "types": [
+ "jasmine"
+ ]
+ },
+ "files": [
+ "src/test.ts",
+ "src/polyfills.ts"
+ ],
+ "include": [
+ "src/**/*.spec.ts",
+ "src/**/*.d.ts"
+ ]
+}
diff --git a/projects/ngx-infinite-scroll/.browserslistrc b/projects/ngx-infinite-scroll/.browserslistrc
new file mode 100644
index 0000000..4f9ac26
--- /dev/null
+++ b/projects/ngx-infinite-scroll/.browserslistrc
@@ -0,0 +1,16 @@
+# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
+# For additional information regarding the format and rule options, please see:
+# https://github.com/browserslist/browserslist#queries
+
+# For the full list of supported browsers by the Angular framework, please see:
+# https://angular.io/guide/browser-support
+
+# You can see what browsers were selected by your queries by running:
+# npx browserslist
+
+last 1 Chrome version
+last 1 Firefox version
+last 2 Edge major versions
+last 2 Safari major versions
+last 2 iOS major versions
+Firefox ESR
diff --git a/projects/ngx-infinite-scroll/CHANGELOG.md b/projects/ngx-infinite-scroll/CHANGELOG.md
new file mode 100644
index 0000000..5a5e8a8
--- /dev/null
+++ b/projects/ngx-infinite-scroll/CHANGELOG.md
@@ -0,0 +1,173 @@
+## v 13.0.0 (2022/26/03)
+- [UPGRADE] - now using Angular 13
+- [DEV] - includes now a demo app for development
+
+## v 10.1.0 (2020/12/09)
+
+- [FIX] - fixes fast scroll issues #385
+
+## v 10.0.1 (2020/12/09)
+
+- [FIX] - throttle behavior refined - fixed issue #198
+
+## v 10.0.0 (2020/11/07)
+
+- [UPGRADE] - now using Angular 10
+
+## v 9.1.0 (2020/09/09)
+
+- [UPGRADE] - upgrading scarf
+
+## v 9.0.0 (2020/05/12)
+
+- [UPGRADE] - now using Angular 9
+
+## v 8.0.2 (2020/05/10)
+
+- [CHORE] - add @scarf
+
+## v 8.0.1 (2019/10/15)
+
+- [FIX] - solves issue with open collective postinstall #321
+
+## v 8.0.0 (2019/07/26)
+
+- [UPGRADE] - now using Angular 8
+- [BREAKING_CHANGE] - `InfiniteScrollEvent` is renamed to `IInfiniteScrollEvent`
+
+## v 7.2.0 (2019/06/10)
+
+- [FIX] - fixes #322 - fixing scrollDistance calculations to include it reach to definite bottom
+
+## v 7.1.0 (2019/03/10)
+
+- [FIX] - 'alwaysCallback' to trigger only when past distance point
+- [UPGRADE] - unit tests with puppeteer
+- [UPGRADE] - scorll state is now handled within a class
+- [FIX] - using now opencollective-postinstall #296
+
+## v 7.0.1 (2019/01/04)
+
+- [FIX] - build fix adding correct version of Typescript 3
+
+## v 7.0.0 (2018/12/30)
+
+- [UPGRADE] - now using Angular 7
+
+## v 6.0.1 (2018/06/15)
+
+- [FIX] - scroll up calculations issues #282
+- [CHORE] - more tests for "shouldFireScrollEvent()"
+- [CHORE] - added an "exmaples" instead "example" for development
+
+## v 6.0.0 (2018/05/22)
+
+- [UPGRADE] - upgrade to Angular 6 & rxjs 6
+- [CHORE] - demo now with https://stackblitz.com
+
+## v 0.8.4 (2018/04/11)
+
+- [FIX] - bug fixes
+- [UPGRADE] - rxjs 5.5.6 upgrade
+- [CHORE] - Add npm badges
+
+## v 0.8.3 (2018/02/21)
+
+- [FIX] - fix for #198 - takes a long time for onscroll to fire
+- [UPDATE] - default value for throttle changed to 150
+
+## v 0.8.2 (2018/01/07)
+
+- [FIX] - fix for #221 - action not fired on Windows scrolling
+- [FIX] - fix for #228 - scrolling back up to the top of the list and then scroll down doesn't trigger event
+- [REFACTOR] - shorten var names
+
+## v 0.8.1 (2018/01/07)
+
+- [REFACTOR] - performance optimization for scroll events
+
+## v 0.8.0 (2018/01/02)
+
+- [FIX] - now triggers only once when in or after target (#200)
+- [REFACTOR] - "distance" number has been refined to be the percentage point of the scroll nob.
+- [REFACTOR] - added more unit tests.
+
+## v 0.7.2 (2017/12/07)
+
+- [FIX] - fix for ie11 - fix #157
+
+## v 0.7.1 (2017/11/27)
+
+- [FIX] - use html container if passed in #217 - fix #216
+
+## v 0.7.0 (2017/11/27)
+
+- [ADD] - watch changes for: infiniteScrollDisabled - fix #196
+- [ADD] - watch changes for: infiniteScrollDistance - fix #202
+- [FIX] - fix for IE11 - fix #203
+- [REFACTOR] - "disable" now removes the scroll listener instead of rxjs/filter
+
+## v 0.6.1 (2017/10/20)
+
+- [REFACTOR] - updated code to be functional based
+- [FIX] - fix #67, fix #191, fix #190
+
+## v 0.5.2 (2017/09/27)
+
+- [FIX] - fix #157, fix #162, fix #171, fix #188
+- [DOCS] - added example for development
+
+## v 0.5.1 (2017/04/25)
+
+- [FIX] - fixes #156 - running scroll logics outside of angular's zone
+
+## v 0.5.0 (2017/04/24)
+
+- [MAINTAINANCE] - code refactor - removing factories to rely more pure functional methods in PositionResolver, AxisResolver
+
+## v 0.4.2 (2017/04/19)
+
+- [NEW] - added **'[infiniteScroll]'** by [Angular's styleguide](https://angular.io/docs/ts/latest/guide/style-guide.html#!#02-06). **[infinite-scroll]** will be deprecated in future version.
+- reduced bundle size with imports for RxJS Observable and Subscription objects #126.
+- removed old code directory from repo
+
+## v 0.4.1 (2017/04/13)
+
+- Fixes #147 - (**InfiniteScrollModule is not an NgModule**)
+
+## v 0.4.0 (2017/04/12)
+
+- Added Angular 4 support
+- New starter code base ([based on angular-library-starter](https://github.com/robisim74/angular-library-starter))
+
+## v 0.3.3 (2017/03/01)
+
+### Updates
+
+- reverted the fix of #126
+
+## v 0.3.2 (2017/03/01)
+
+### Updates
+
+- fixes [#126](https://github.com/orizens/angular2-infinite-scroll/issues/126)
+
+## v 0.3.1 (2017/02/15)
+
+### Updates
+
+- added custom scrollable container from [#108](https://github.com/orizens/angular2-infinite-scroll/pull/108/files)
+
+## v 0.3.0 (2017/01/31)
+
+### Updates
+
+- refactored infinite scroller to smaller modules with composition
+- added "models" - includes interfaces for development
+
+## v 0.2.9 (2017/01/13)
+
+### Updates
+
+- added changelog.md
+- ([refactor(scroll): replaces throttle with debounce](https://github.com/orizens/angular2-infinite-scroll/pull/82))
diff --git a/projects/ngx-infinite-scroll/CONTRIBUTING.md b/projects/ngx-infinite-scroll/CONTRIBUTING.md
new file mode 100644
index 0000000..730b1f5
--- /dev/null
+++ b/projects/ngx-infinite-scroll/CONTRIBUTING.md
@@ -0,0 +1,67 @@
+# Contribute
+
+## Introduction
+
+First, thank you for considering contributing to ngx-infinite-scroll! It's people like you that make the open source community such a great community! 😊
+
+We welcome any type of contribution, not only code. You can help with
+- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
+- **Marketing**: writing blog posts, howto's, printing stickers, ...
+- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
+- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
+- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/ngx-infinite-scroll).
+
+## Your First Contribution
+
+Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
+
+## Submitting code
+
+Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
+
+## Code review process
+
+The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
+It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
+
+## Financial contributions
+
+We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/ngx-infinite-scroll).
+Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
+
+## Questions
+
+If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!).
+You can also reach us at hello@ngx-infinite-scroll.opencollective.com.
+
+## Credits
+
+### Contributors
+
+Thank you to all the people who have already contributed to ngx-infinite-scroll!
+
+
+
+### Backers
+
+Thank you to all our backers! [[Become a backer](https://opencollective.com/ngx-infinite-scroll#backer)]
+
+
+
+
+### Sponsors
+
+Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/ngx-infinite-scroll#sponsor))
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projects/ngx-infinite-scroll/Development Instructions.md b/projects/ngx-infinite-scroll/Development Instructions.md
new file mode 100644
index 0000000..f8798f3
--- /dev/null
+++ b/projects/ngx-infinite-scroll/Development Instructions.md
@@ -0,0 +1,25 @@
+# NgxInfiniteScroll
+
+This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.1.0.
+
+## Code scaffolding
+
+Run `ng generate component component-name --project ngx-infinite-scroll` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-infinite-scroll`.
+
+> Note: Don't forget to add `--project ngx-infinite-scroll` or else it will be added to the default project in your `angular.json` file.
+
+## Build
+
+Run `ng build ngx-infinite-scroll` to build the project. The build artifacts will be stored in the `dist/` directory.
+
+## Publishing
+
+After building your library with `ng build ngx-infinite-scroll`, go to the dist folder `cd dist/ngx-infinite-scroll` and run `npm publish`.
+
+## Running unit tests
+
+Run `ng test ngx-infinite-scroll` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
diff --git a/projects/ngx-infinite-scroll/README.md b/projects/ngx-infinite-scroll/README.md
new file mode 100644
index 0000000..0410a3f
--- /dev/null
+++ b/projects/ngx-infinite-scroll/README.md
@@ -0,0 +1,278 @@
+[](https://travis-ci.org/orizens/ngx-infinite-scroll) [](#backers) [](#sponsors)
+[](https://badge.fury.io/js/ngx-infinite-scroll)
+[](https://badge.fury.io/js/ngx-infinite-scroll)
+[](https://img.shields.io/npm/dm/ngx-infinite-scroll.svg)
+[](https://img.shields.io/npm/dt/ngx-infinite-scroll.svg)
+
+## [Consider Becoming a sponsor](https://opencollective.com/ngx-infinite-scroll#sponsor)
+
+# Angular Infinite Scroll
+
+versions now follow Angular's version to easily reflect compatibility.
+Meaning, for **Angular 10**, use `ngx-infinite-scroll @ ^10.0.0`
+
+## Angular - Older Versions Support
+
+Starting **Angular 6 and Above** - `ngx-infinite-scroll@THE_VERSION.0.0`
+For **Angular 4** and **Angular = ^5.5.6** - use version `ngx-infinite-scroll@0.8.4`
+For **Angular 5.x** with **rxjs =<5.5.2** - use version `ngx-infinite-scroll@0.8.3`
+For Angular version **<= 2.3.1**, you can use `npm i angular2-infinite-scroll` (latest version is 0.3.42) - please notice **the angular2-infinite-scroll** package is deprecated
+
+## Used By
+
+- [Google](https://google.com)
+- [Apple](https://apple.com)
+- [Amazon](https://amazon.com)
+- [Microsoft](https://microsoft.com)
+- [Disney](https://disney.com)
+- [Sap](https://sap.com/)
+- [Cisco](https://cisco.com/)
+- [Yandex](https://yandex.com)
+- [Ancestry](https://www.ancestry.com/)
+
+and much more.
+
+> _These analytics are made available via the awesome [Scarf](https://www.npmjs.com/package/@scarf/scarf) package analytics library_
+
+### Opt-Out Of Scarf
+
+Scarf can be disabled by following [these directions](https://github.com/orizens/ngx-infinite-scroll/issues/352#issuecomment-742009046)
+
+## Front End Consulting Services
+
+I'm a Senior Front End Engineer & Consultant at [Orizens](https://orizens.com).
+My services include:
+
+- Angular/React/Javascript Consulting
+- Front End Architecture Consulting
+- Project Code Review
+- Project Development
+
+[Contact Here](http://orizens.com/contact)
+
+
+
+
+
+## Installation
+
+```
+npm install ngx-infinite-scroll --save
+```
+
+## Supported API
+
+### Properties
+
+| @Input() | Type | Required | Default | Description |
+| ------------------------ | -------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| infiniteScrollDistance | number | optional | 2 | the bottom percentage point of the scroll nob relatively to the infinite-scroll container (i.e, 2 (2 \* 10 = 20%) is event is triggered when 80% (100% - 20%) has been scrolled). if container.height is 900px, when the container is scrolled to or past the 720px, it will fire the scrolled event. |
+| infiniteScrollUpDistance | number | optional | 1.5 | should get a number |
+| infiniteScrollThrottle | number | optional | 150 | should get a number of **milliseconds** for throttle. The event will be triggered this many milliseconds after the user _stops_ scrolling. |
+| scrollWindow | boolean | optional | 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 | 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 | false | doesn't invoke the handler if set to true |
+| horizontal | boolean | optional | false | sets the scroll to listen for horizontal events |
+| alwaysCallback | boolean | optional | false | instructs the scroller to always trigger events |
+| infiniteScrollContainer | string / HTMLElement | optional | 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. |
+| fromRoot | boolean | optional | false | if **infiniteScrollContainer** is set, this instructs the scroller to query the container selector from the root of the **document** object. |
+
+### Events
+
+| @Output() | Type | Event Type | Required | Description |
+| ---------- | ------------ | -------------------- | -------- | ------------------------------------------------------------------------------- |
+| scrolled | EventEmitter | IInfiniteScrollEvent | optional | this will callback if the distance threshold has been reached on a scroll down. |
+| scrolledUp | EventEmitter | IInfiniteScrollEvent | optional | this will callback if the distance threshold has been reached on a scroll up. |
+
+## Behavior
+
+By default, the directive listens to the **window scroll** event and invoked the callback.
+**To trigger the callback when the actual element is scrolled**, these settings should be configured:
+
+- [scrollWindow]="false"
+- set an explict css "height" value to the element
+
+## DEMO
+
+[Try the Demo in StackBlitz](https://stackblitz.com/edit/ngx-infinite-scroll)
+
+## Usage
+
+First, import the InfiniteScrollModule to your module:
+
+```typescript
+import { NgModule } from "@angular/core";
+import { BrowserModule } from "@angular/platform-browser";
+import { InfiniteScrollModule } from "ngx-infinite-scroll";
+import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
+import { AppComponent } from "./app";
+
+@NgModule({
+ imports: [BrowserModule, InfiniteScrollModule],
+ declarations: [AppComponent],
+ bootstrap: [AppComponent],
+})
+export class AppModule {}
+
+platformBrowserDynamic().bootstrapModule(AppModule);
+```
+
+In this example, the **onScroll** callback will be invoked when the window is scrolled down:
+
+```typescript
+import { Component } from "@angular/core";
+
+@Component({
+ selector: "app",
+ template: `
+
+ `,
+})
+export class AppComponent {
+ onScroll() {
+ console.log("scrolled!!");
+ }
+}
+```
+
+in this example, whenever the "search-results" is scrolled, the callback will be invoked:
+
+```typescript
+import { Component } from "@angular/core";
+
+@Component({
+ selector: "app",
+ styles: [
+ `
+ .search-results {
+ height: 20rem;
+ overflow: scroll;
+ }
+ `,
+ ],
+ template: `
+
+ `,
+})
+export class AppComponent {
+ onScroll() {
+ console.log("scrolled!!");
+ }
+}
+```
+
+In this example, the **onScrollDown** callback will be invoked when the window is scrolled down and the **onScrollUp** callback will be invoked when the window is scrolled up:
+
+```typescript
+import { Component } from "@angular/core";
+import { InfiniteScroll } from "ngx-infinite-scroll";
+
+@Component({
+ selector: "app",
+ directives: [InfiniteScroll],
+ template: `
+
+ `,
+})
+export class AppComponent {
+ onScrollDown() {
+ console.log("scrolled down!!");
+ }
+
+ onScrollUp() {
+ console.log("scrolled up!!");
+ }
+}
+```
+
+In this example, the **infiniteScrollContainer** attribute is used to point directive to the scrollable container using a css selector. **fromRoot** is used to determine whether the scroll container has to be searched within the whole document (`[fromRoot]="true"`) or just inside the **infiniteScroll** directive (`[fromRoot]="false"`, default option).
+
+```typescript
+import { Component } from "@angular/core";
+
+@Component({
+ selector: "app",
+ styles: [
+ `
+ .main-panel {
+ height: 100px;
+ overflow-y: scroll;
+ }
+ `,
+ ],
+ template: `
+