angular-unamed-scroll
0.1.0 • Public • Published angular-unamed-scroll
Scroll to elements on page without relying on IDs. Adds named elements to the
service, then scroll to them anywhere in your code.
It's actually an oxymoron. You name your elements, you just don't rely on the ID attribute.
Install
bower install angular-unamed-scroll
Usage
HTML
<div ng-controller="SomeCtrl as ctrl">
<div unamed-scroll="name"></div>
<a ng-click="ctrl.go('name')"></a>
</div>
JS
angular
.module('YourApp', ['UnamedScroll'])
.controller('SomeCtrl', ['UnamedScroll', function(UnamedScroll){
this.go = function(name){
UnamedScroll.scrollTo(name).then(function(exists){
});
};
}])
;
License
MIT
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
0.1.0 | 0 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
0.1.0 | 0 | |
Package Sidebar
Install
npm i angular-unamed-scroll
Weekly Downloads