1

I'm trying to test an app on iPad, where i found ng-click not working on ipad portrait mode. It is working as expected on desktop and ipad landscape mode.

Even on android phone same behaviour is seen. Working on landscape mode but not working on portrait mode.

here is my view :

 <div ng-controller="ModelForecastController as ModelForecast">
<div class="col-xs-12">

  <div class="row">
    <div class="col-xs-6">
      <div class="form-control-static">
        <strong>Last Updated:</strong> {{ModelForecast.demand.lastModified}}
      </div>
    </div>
    <div class="col-xs-6 text-right padding-bottom"
         ng-hide="ModelForecast.componentStatus.contentReadOnly ||
 !ModelForecast.keyGroup.validData || ModelForecast.componentStatus.saveLoading">
      <button class="btn btn-default"
              ng-click="ModelForecast.resetPage()">Reset</button>
      <button class="btn btn-primary"
              ng-disabled="form.$invalid"
              ng-click="ModelForecast.saveData()">Save</button>
    </div>
  </div>
</div>

my controller:

 var ModelForecastController =
  function( $log, $scope, $state, $modal, $rootScope,
            bandCalculateService, fetchPageDataService,
            pageBandRecalculateService, fusionChartsDataService,
            modelForecastService, globalConstant,
            optionListService, keyGroupService, Utility ) {
    var vm = this,

     vm.resetPage = function() {
      alert('reste Page');
      vm.componentStatus = angular.copy( componentFlag );
      vm.renderPage();
    };

     vm.saveData = function() {
      alert('save data 2');
      var dirtyBasket = {
        userGroup: keyGroupService.userGroupSelection.userGrp,
        dealer: keyGroupService.locationSelection.loc,
        productGroup: keyGroupService.productGroupSelection.id,
        model: keyGroupService.modelSelection.id,
        demandGroup: []
      };
      // -- do other stuffs -- //
    };

I'm using angular-touch and class is becoming ng-click-active when clicked on dektop and ipad(landscape mode). But class is not becoming ng-click-active when it is in portrait mode.

issue seems to be working only for this module as for other modules touch is working fine.

Angular - version - 1.3.8 Angular-touch version - 1.4.3

Sinha
  • 773
  • 2
  • 16
  • 34
  • Try to remove Angular-Touch, it is not mandatory. I had a similar issue on Windows Phone. Element with both ng-click and ng-href did not work at all. – David Votrubec Nov 18 '15 at 13:06
  • It did not have Angular touch earlier and it wasn't working on portrait and landscape. After adding ngTouch it started working on landscape but not on portrait. – Sinha Nov 18 '15 at 13:36
  • Possible duplicate of [change phone orientation but scope variable doesn't refresh](http://stackoverflow.com/questions/35986921/change-phone-orientation-but-scope-variable-doesnt-refresh) – Paul Sweatte Sep 20 '16 at 14:13

0 Answers0