ionicGesture and pinch in controller

Hi every one, I’m trying to have some value when I pinch on my Ionic app
I’ve a simple controller:

 .controller('HomeCtrl',function($scope,$ionicGesture) {
        var element = angular.element(document.querySelector('#eventCiao'));
        $ionicGesture.on('pinch', function(e)
            $scope.zoom = e.gesture.scale;        

And in my template I’ve:

<ion-view hide-nav-bar="true">
<ion-content scroll="false">
    <div id="eventCiao">{{zoom}}</div>

the console print the pinch’s value but in template it is not displayed.
have you any ideas? thansk a lot

1 Like

the solution is… use $apply, what a fool!

1 Like

I recommend you to write a directive for it just like what ionic did for “swipe” events. Anyway, good to see you solved your problems.