Here’s the scenario. I want to run an expensive function on a time interval that is called on many pages.
If someone else also calls the expensive function, it will ignore this request.
app.js
1 | angular.module('app', []) |
controller.js
1 | function ctrl($scope){ |