Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a = false, b = false;
- $scope.$on("eventA", function(){
- a = true;
- if (b)
- performTask();
- });
- $scope.$on("eventB", function(){
- b = true;
- if (a)
- performTask();
- });
- var performTask = function() {
- ................
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement