Skip to content
This repository has been archived by the owner on Jul 22, 2018. It is now read-only.

An AngularJS directive for ScrollToFixed

License

Notifications You must be signed in to change notification settings

xavierdutreilh/angular-scrolltofixed

Repository files navigation

angular-scrolltofixed Build Status

An AngularJS directive for ScrollToFixed

Installation

bower install angular-scrolltofixed

Usage

First, read the documentation of ScrollToFixed.

Then, inject angular-scrolltofixed into your application:

angular.module('myApp', ['scrollToFixed']);

And add the directive scroll-to-fixed to any element that you want to fix:

<p scroll-to-fixed>Hello, world!</p>

Attributes

scroll-to-fixed

scroll-to-fixed defines the options to pass to ScrollToFixed.

You can specify them via a plain object in your templates:

<p scroll-to-fixed="{ 'bottom': 0 }">Hello, world!</p>

or a scoped object in your controllers:

$scope.scrollToFixedOptions = {
  'bottom': 0
};
<p scroll-to-fixed="scrollToFixedOptions">Hello, world!</p>

ng-model

ng-model defines the object to watch and triggers a resize event on ScrollToFixed when this object changes.

Events

update

update triggers a resize event on ScrollToFixed.

$destroy

$destroy triggers a detach.ScrollToFixed event on ScrollToFixed.

License

angular-scrolltofixed is released under the MIT license.

About

An AngularJS directive for ScrollToFixed

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published