windows phone 8.1 - OnsenUI ons-pull-hook not working in IE11 on WP8.1 -


i've been trying make ons-pull-hook work phonegap/cordova on wp8.1 device haven't had luck it.

i'm using official example can found here:

ons.bootstrap()        .controller('democontroller', function($scope, $timeout, $http) {          $scope.items = [];          $scope.load = function($done) {            $timeout(function() {              $http.jsonp('http://numbersapi.com/random/year?callback=json_callback')                .success(function(data) {                  $scope.items.unshift({                    desc: data,                    rand: math.random()                  });                })                .error(function() {                  $scope.items.unshift({                    desc: 'no data',                    rand: math.random()                  });                })                .finally(function() {                  $done();                });            }, 1000);          };          $scope.reset = function(){            $scope.items.length = 0;          }        });
.left {  	text-align: left;  }    img{      position: absolute;      margin: auto;      top: 0;      bottom: 0;  }    ons-list-item {      line-height: 22px !important;  }    .info{  	margin-top: 20px;  	text-align: center;  	opacity: 0.75;  }
<link href="https://cdn.rawgit.com/onsenui/onsenui/1.3.4/build/css/onsen-css-components.css" rel="stylesheet"/>  <link href="https://cdn.rawgit.com/onsenui/onsenui/1.3.4/build/css/onsenui.css" rel="stylesheet"/>    <script src="https://cdn.rawgit.com/onsenui/onsenui/1.3.4/build/js/angular/angular.min.js"></script>  <script src="https://cdn.rawgit.com/onsenui/onsenui/1.3.4/build/js/onsenui.min.js"></script>    <ons-page ng-controller="democontroller">        <ons-pull-hook ng-action="load($done)" var="loader">          <span ng-switch="loader.getcurrentstate()">            <span ng-switch-when="initial"><ons-icon size="35px" icon="ion-arrow-down-a"></ons-icon> pull down refresh</span>            <span ng-switch-when="preaction"><ons-icon size="35px" icon="ion-arrow-up-a"></ons-icon> release refresh</span>            <span ng-switch-when="action"><ons-icon size="35px" spin="true" icon="ion-load-d"></ons-icon> loading data...</span>          </span>        </ons-pull-hook>          <ons-toolbar>          <div class="center">pull refresh</div>          <div class="right">            <ons-toolbar-button ng-click="reset()">reset</ons-toolbar-button>          </div>        </ons-toolbar>          <ons-list>            <ons-list-item ng-show="items.length === 0">            <div class="info">              pull down fetch items            </div>          </ons-list-item>          <ons-list-item class="item" ng-repeat="item in items">              <ons-row>                  <ons-col width="80px">                    <img ng-src="http://lorempixel.com/60/60/?{{item.rand}}" class="item-thum"></img>                  </ons-col>                  <ons-col>                      <p class="item-desc">{{ item.desc }}</p>                  </ons-col>              </ons-row>          </ons-list-item>        </ons-list>        </ons-page>

or in codepen actual http request works http://codepen.io/onsen/pen/wbjogm/ (don't know why doesn't here in so)

it works fine on browser , using ripple emulator on chrome, when using cordova build , visual studio deploy device, pull refresh action not work @ all.

everything else works fine, clicks, inputs, scrolling, etc. pull refresh doesn't work. else having issue and/or found solution?

i tried changing different styles , tried disabling overscrolling without success, i've been searching days now.

edit 1:

it doesn't work ie11/edge accessing directly either, guess issue has ie11/edge in general , not related cordova or visual studio deploy.

edit 2:

it does, however, work on ie11 desktop on surface pro 3 via touch emulating windows phone...so must specific issue real ie11 windows phone 8.1 itself..

edit 3:

adding simplier example, , doesn't have cordova nor visual studio, rather how ie11 handles pointerevents (and maybe it's issue onsen itself), maybe...that's i've been able dig far these past 2-3 days.

ons.bootstrap()  .controller('mycontroller', function($scope, $timeout) {      $scope.items = [3, 2 ,1];        $scope.load = function($done) {        $timeout(function() {          $scope.items.unshift($scope.items.length + 1);          $done();        }, 500);      };    });
<link href="https://cdn.rawgit.com/onsenui/onsenui/1.3.5/build/css/onsen-css-components.css" rel="stylesheet"/>  <link href="https://cdn.rawgit.com/onsenui/onsenui/1.3.5/build/css/onsenui.css" rel="stylesheet"/>    <script src="https://cdn.rawgit.com/onsenui/onsenui/1.3.5/build/js/angular/angular.min.js"></script>  <script src="https://cdn.rawgit.com/onsenui/onsenui/1.3.5/build/js/onsenui.min.js"></script>    <ons-page ng-controller="mycontroller">    <ons-toolbar>      <div class="center">pull refresh</div>    </ons-toolbar>    <ons-pull-hook var="loaded" ng-action="load($done)">      <span ng-switch="loader.getcurrentstate()">        <span ng-switch-when="initial">pull down refresh</span>        <span ng-switch-when="preaction">release refresh</span>        <span ng-switch-when="action">loading data. please wait...</span>      </span>    </ons-pull-hook>    <ons-list>      <ons-list-item ng-repeat="item in items">        item #{{ item }}      </ons-list-item>    </ons-list>  </ons-page>

thanks

i feel very dumb post answer own problem, managed make work inside cordova, , mistake. clues got comments made me realize maybe wasn't exporting/building project correctly.

i using wp8 platform, instead of (universal) windows platform, means entire project wasn't 100% compatible ie on wp8.1 because wp8 platform depends on webview...

what doing:

cordova platform add wp8 -> cordova build wp8 -> open .sln file, change target platform wp8.1 -> deploy device

what i'm doing now:

cordova platform add windows -> cordova build windows -- --phone -> open .sln file

now works fine.

on other hand, i'm still not able make work on ie11 directly, without cordova.js, i'm guessing issue hammer.js , not onsen-ui, though relies on , confused me. that's issue entirely.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -