Simple module to enable counting watches in your AngularJS app.

Added by: Sam Deering





Stars: 12

Watchers: 12

Forks: 1

Module Description


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-12-07 15:00:13

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!