New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-raf

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-raf

requestAnimationFrame() service for Angular.JS applications.

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

angular-raf

RAF

Provides some useful wrappers around requestAnimationFrame() and cancelAnimationFrame() integrated with Angular.JS view life-cycle.

Supported browsers:

  • Chrome 31+
  • Firefox 26+
  • Internet Explorer 10+
  • Safari 7+

Basically, any browser exposing requestAnimationFrame() and cancelAnimationFrame().

Installation

This library is provided as a Bower component and NPM module:

  • Bower: bower install angular-raf
  • NPM: npm install angular-raf

How to use

Add angular-raf to the list of dependencies in your Angular.JS application:

angular.module('myapp', [
    'ngRoute',
    // ...
    'angular-raf'
]);

Available helpers

onRenderFrame

onRenderFrame wraps requestAnimationFrame() and takes a callback as first argument, calling it continuously whenever the browser has to render another frame, stopping only when the user is browsing away from your controller.

angular.module('myapp').controller('MyController', function ($scope, raf) {
    raf.onRenderFrame($scope, function() {
        // Perform jQuery-style DOM manipulation or update Scope variables here.
    });
});

FAQs

Package last updated on 12 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc