npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng-iscroll

v1.3.1

Published

ng-iScroller v1.3 ============

Downloads

5

Readme

ng-iScroller v1.3

AngularJS Module that enables iScroll 5.x to work using a directive

Demos

See demo/ Directory Note: Recommended to be used with iOS or Android devices only

Dependencies

Installation

  • Bower: Install the package by adding ng-iScroll to your bower.json file.

Reporting Issues

  • Issues can be reported at the Github project.

Features

  • Option to set time delay on binding of iScroll to dom
  • Support for multiple iScrolls per page
    • See demo/demo_multiple_iscrolls.htm for how to use multiple iScroll divs on the same page
  • Support for setting iScroll specific options via App Controller
    • See demo/app.js or demo/app_multi.js for how
  • Support for iScroll 'refresh' and other functions via App Controller
  • iScroll Options can be set via App Controller

Usage

  • Include ng-iscroll.js or ng-iscroll.min.js in your html header or existing file before your application main js file

  • Add 'ng-iscroll' to your Angular app's dependencies

  • Example var App = angular.module('App', ['ng-iscroll']);

  • Add directive ng-iscroll to the <div id="wrapper">

  • Example: <div id="wrapper" ng-iscroll>

Options

HTML Directive Settings

Binding Delay: If you want to delay the iScroll binding due to having animations or using another JS Library to modify the Angular view you can add a timeout value by using the attribute ng-iscroll-delay='{delayInMiliseconds}'. The default delay is 5ms.

Forms: Forms within an iScroll has certain issues with editing Text values or Select boxes. To enable support for forms add the following option to the wrapper div: ng-iscroll-form='true' the default is set to 'false'

Naming of Instance: When multiple iScrolls are present on a single page and each needs different runtime settings or functions there is a need to identify each instance. This is done either by setting the 'ng-iscroll="{instanceName}"' or if not set it will default to the id of the div.

Note: This breaks version 1.0's usage of the ng-iscroll value to define the delay in dom binding. Please update your code to use ng-iscroll-delay to change the default delay.

See demos/ directory for examples of both

Angular Controller Settings

iScroll exposes both runtime and other functions that can change the appearance or behavior of the iScroll. These can be set via the AppController to further configure iScroll.

Example:

HTML:

<div id="wrapper" ng-iscroll='wrapper' ng-iscroll-delay='50'>
	<button ng-click="refreshiScroll()">Refresh</button>
</div>

AppController:

$scope.$parent.myScrollOptions = {
	'wrapper': {
		snap: false,
		onScrollEnd: function ()
		{
			alert('finshed scrolling wrapper');
	}},
};

$scope.refreshiScroll = function ()
{
	$scope.$parent.myScroll['wrapper'].refresh();
	alert('wrapper refreshed');
};

The default settings for ng-iScroll are the following:

  • snap: true
  • momentum: true
  • hScrollbar: false
  • mouseWheel: true

The above can be overridden using the $scope.$parent.myScrollOptions option in your Controller.

For more examples see the demo directory.

License

ng-IScroll is released under the MIT License.

Special Thanks

Thanks to the following help for submitting bugs and suggesting new features:

Rodrigo Mesquita de Abreu

Robert

Andre Meyering

Brandon Benson