{"id":14973460,"url":"https://github.com/haensl/nganimatedscroll","last_synced_at":"2026-03-13T15:01:59.145Z","repository":{"id":54713180,"uuid":"55913007","full_name":"haensl/ngAnimatedScroll","owner":"haensl","description":"A promise based angular.js service to facilitate animated scrolling.","archived":false,"fork":false,"pushed_at":"2021-02-02T19:59:44.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T12:55:00.590Z","etag":null,"topics":["angular","angular-service","angular1","angular1-x","angularjs","animation","module","promise","promises","scrolling"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haensl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-10T17:30:59.000Z","updated_at":"2021-02-02T21:56:28.000Z","dependencies_parsed_at":"2022-08-14T00:40:38.510Z","dependency_job_id":null,"html_url":"https://github.com/haensl/ngAnimatedScroll","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2FngAnimatedScroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2FngAnimatedScroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2FngAnimatedScroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haensl%2FngAnimatedScroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haensl","download_url":"https://codeload.github.com/haensl/ngAnimatedScroll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250808444,"owners_count":21490668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-service","angular1","angular1-x","angularjs","animation","module","promise","promises","scrolling"],"created_at":"2024-09-24T13:48:48.019Z","updated_at":"2026-03-13T15:01:54.101Z","avatar_url":"https://github.com/haensl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED: ngAnimatedScroll\n\nA promise based angular.js service to facilitate animated scrolling\n\n## Deprecation notice\n\nDue to the [end of life of Angular.js](https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c), this module is deprecated and no longer maintained.\n\n[![NPM](https://nodei.co/npm/ng-animated-scroll.png?downloads=true)](https://nodei.co/npm/ng-animated-scroll/)\n\n## Features\n\n- Exposes a service that scrolls an arbitrary element to another element's location.\n- Promise enabled: The service returns a promise and resolves upon completion of the scroll operation.\n- Selector enabled: Use CSS selectors to specify to which element to scroll.\n- Leverages [`window.getAnimationFrame()`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) for a smooth and efficient scroll animation\n- Clean: No classes, no jQuery, no CSS, just plain Angular.js\n\n## Installation\n\n1. Install the ngAnimatedScroll package\n\n  via **NPM**:\n\n  ```javascript\n  npm install ng-animated-scroll --save\n  ```\n\n  or **Bower**:\n\n  ```javascript\n  bower install ng-animated-scroll --save\n  ```\n\n2. Include the library into your application:\n\n  if installed via **NPM** include from `node_modules`:\n\n  ```html\n  \u003cscript src=\"/node_modules/ng-animated-scroll/dist/ngAnimatedScroll.service.min.js\"\u003e\u003c/script\u003e\n  ```\n\n  if installed via **Bower** include from `bower_components`:\n\n  ```html\n  \u003cscript src=\"/bower_components/ng-animated-scroll/dist/ngAnimatedScroll.service.min.js\"\u003e\u003c/script\u003e\n  ```\n\n## Usage\n\n1.  Add a dependency to `AnimatedScroll` to your app\n\n    ```javascript\n    angular.module('myApp', ['AnimatedScroll']);\n    ```\n\n2.  Inject the `animatedScroll` service into your directive, factory, controller, etc. and call it's `scroll()` method.\n    ```javascript\n    angular.module('myController', ['animatedScroll', function(animatedScroll) {\n      animatedScroll.scroll(elementToScrollTo);\n    }]);\n    ```\n\n\n### Example: Simple scroll operation\n\n```javascript\nangular.module('myController', ['animatedScroll', function(animatedScroll) {\n  var elementIWantToScrollTo = document.getElementById('anElementIWantToScrollTo');\n  animatedScroll.scroll(elementIWantToScrollTo);\n}]);\n```\n\n### Example: Using CSS selectors\n\n```javascript\nangular.module('myController', ['animatedScroll', function(animatedScroll) {\n  animatedScroll.scroll('#someElement');\n}]);\n```\n\n### Example: Leveraging the promise\n\n```javascript\nangular.module('myController', ['animatedScroll', function(animatedScroll) {\n  var elementIWantToScrollTo = document.getElementById('anElementIWantToScrollTo');\n  animatedScroll.scroll(elementIWantToScrollTo)\n    .then(function(element) {\n      // do something after the element was scrolled into view\n      // element = elementIWantToScrollTo\n    });\n}]);\n```\n\n### Example: Scrolling within an Element\n\n```javascript\nangular.module('myController', ['animatedScroll', function(animatedScroll) {\n  var listItemIWantToScrollTo = document.getElementById('listItemIWantToScrollTo');\n  var list = document.getElementById('aList');\n  animatedScroll.scroll(elementIWantToScrollTo, {\n    scrollElement: list\n  }).then(function(element) {\n    // do something after the the list item was scrolled into view\n    // element = listItemIWantToScrollTo\n  });\n}]);\n```\n\n## Arguments\n\n### element _(required)_\n\nType: `Element | angular.element | selector (string)`\n\nThe element to scroll to. This can be an angular.element, (HTML)Element or CSS selector string.\n\n### options _(optional)_\n\nType: `Object`\n\nOptions for the scroll operation. _(See [Options](#options))_\n\n## []()Options\n\n### duration\n\nType: `Integer` Default: `800`\n\nThe duration of the scroll animation in milliseconds.\n\n### offset\n\nType: `Integer` Default: `0`\n\nAn offset to the element's top at which to stop scrolling.\n\n### easing\n\nType: `String` Default: `easeInOutQuart`\n\nThe easing function to be used for the animation. Currently supported are:\n\n- `easeInQuad`\n- `easeOutQuad`\n- `easeInOutQuad`\n- `easeInCubic`\n- `easeOutCubic`\n- `easeInOutCubic`\n- `easeInQuart`\n- `easeOutQuart`\n- `easeInOutQuart`\n- `easeInQuint`\n- `easeOutQuint`\n- `easeInOutQuint`\n- `none` (no easing)\n\n### scrollElement\n\nType: `Element | angular.element | selector (string)` Default: `window`\n\nThe element to scroll. This can be an angular.element, (HTML)Element or CSS selector string.\n\n## [Changelog](CHANGELOG.md)\n\n## Credits\n\n[ngSmoothScroll](https://github.com/d-oliveros/ngSmoothScroll) by [David Oliveros](https://github.com/d-oliveros) which formed the base for ngAnimatedScroll\n\n\u003chttps://github.com/d-oliveros/ngSmoothScroll\u003e\n\n## [License](LICENSE)\n\nThe MIT License (MIT)\n\nCopyright © Hans-Peter Dietz | [@h_p_d](https://twitter.com/h_p_d) | [h.p.dietz@gmail.com](mailto:h.p.dietz@gmail.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaensl%2Fnganimatedscroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaensl%2Fnganimatedscroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaensl%2Fnganimatedscroll/lists"}