Set initial zoom for ion-scroll


#1

Is there a way to do this? Set a default Scale value.


#2

In the controller:

  var initZoom=0.7;
  $scope.$on('$ionicView.enter',function(){
    $ionicScrollDelegate.$getByHandle('wavesScroller').zoomBy(initZoom);
  });

In the view:

<ion-scroll direction="xy" zooming="true" ng-style="style()" delegate-handle="wavesScroller">

#3

@tomchiverton where is the controller file? Sorry i’m new with ionic!


#4

If you are using routes/states, it’s declared alongside the view name.