2016-09-23 4 views
0

私はイオン化のためのスターターテンプレートを編集しましたが、すべてが-lab環境でうまくいきます。しかし、実際の電話機でアプリケーションを実行すると、速度とパフォーマンスによって使いやすさが低下します。イオンディスプレイとモーダル - 高速電話でもゆっくりとバグがあります

<script id="templates/landingModalRegister.html" type="text/ng-template"> 
      <ion-modal-view class=""> 
       <ion-header-bar class="bar bar-header bar-dark"> 
        <button class="button button-clear button-primary" ng-click="showRegister.hide()">Cancel</button> 
       </ion-header-bar> 
       <ion-content class="registerModal" scroll="false"> 

        <form ng-submit="register()" style="margin-top: 150px"> 
         <label class="item item-input landingInput"> 
          <span class="input-label">Username</span> 
          <input type="text" ng-model="registerData.username"> 
         </label> 
         <label class="item item-input landingInput"> 
          <span class="input-label">Password</span> 
          <input type="password" ng-model="registerData.password"> 
         </label> 
         <label class="item item-input landingInput"> 
          <span class="input-label">Retype password</span> 
          <input type="password" ng-model="registerData.password2"> 
         </label> 
         <label class="item item-input item-select landingInput"> 
          <div class="input-label"> 
           Account Type 
          </div> 
          <select ng-model="registerData.type"> 
           <option>Client</option> 
           <option selected>Admin</option> 
          </select> 
         </label> 
         <label class="item landingInput"> 
          <button class="button button-block button-balanced" type="submit">Register</button> 
         </label> 
        </form> 
       </ion-content> 
      </ion-modal-view> 

例えばonclickの機能によって開始され、このモーダルビューを取ります。このモーダルは、古い電話(Samsung Avant)と新しい電話(Nexus 6p)では開きませんが、ゆっくりと滑らかになりません。私は、デバイスインスペクタを使用してエラーをチェックしました。何も明白ではなく、同じデバイスのようなジャッキーな動作が存在します。これはラボ環境でスムーズです。

私が持っているもう1つの質問は、画像を適切に最適化する方法です。高解像度の画像を使用して(私はそれらを装置の寸法に合わせて)使用すると、背景がまだ目に見えてページに描かれています。

これをネイティブパフォーマンスに近づけるために欠けていることはありますか?

編集:ここに私のモーダルを実装するためのコードがあります。

$ionicModal.fromTemplateUrl('templates/landingModalRegister.html', { 
    scope: $scope, 
    animation: 'slide-in-up' 
}).then(function(modal) { 
    $scope.showRegister = modal; 
}); 

$scope.openRegister = function() { 
    $scope.showRegister.show(); 
} 
+1

は、あなたがそうで、CSSグラデーションをたくさん使って影をボックスとしていることができますか? – manzapanza

+0

@manzapanzaこれは素晴らしい情報でした - 私は問題がボックスシャドウのみであると思っていました。私は背景の上に持っていたすべてのフィルタを脱いで、それはトリックをやった - 非ネイティブな感触を与えthatsのモーダルを起動する際に遅延が依然として存在している - だけでなく、これをスピードアップする方法はありますか? – MonsterWimp757

+0

、私もjsのコードを追加したあなたのモーダル実装 – manzapanza

答えて

関連する問題