jlikness.watch

Simple module to enable counting watches in your AngularJS app.

Added by: Sam Deering

GitHub

Repository

jeremylikness/jlikness.watch

Stats

Stars: 11

Watchers: 11

Forks: 1

Module Description

jlikness.watch

A simple module to enable counting watches in your AngularJS app.

Include jlwatch.js in your app, then add a dependency like this:

angular.module('yourModule', ['jlikness.watch']);

In your HTML, place the jl-watch directive at the top element you want to count watches from. Usually this will be the same level as ng-app:

<body ng-app='yourModule' jl-watch=''>

To generate the watches, load the jlWatchService and call countWatches(). It will return the count as well as update the watchCount property.

['jlWatchService', function (ws) { var count = ws.countWatches(); }]

Refer to index.html for an example. Click here to run the example in your browser.

Module stats last updated: 2017-06-11 15:00:05

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!