Does anyone know how to prevent an event from re-triggering? I tried to use a logic level variable of the controller level to find out if this event has already been fired, but it did not work. It looks like the event is fired on 2 separate threads, and the variable has always been false.
In the code below, the $ ionicPlatform.ready event is fired twice, but I cannot understand why. I am using the current version of Ionic Framework ionic-v1.0.0-beta.13.
angular.module('rsgApp.controllers', []) .controller('MapCtrl', ['$ionicPlatform', function ($ionicPlatform) { var vm = this; $ionicPlatform.ready(function () { alert('device is ready'); }); }]);
source share