How to remove sliding effect while moving one state to another in ionic?

Pallavi Sharma

I am trying to move one view to another on button click> I am able to move one one view to second .But while moving it start slide from right to left .I need to stop that sliding . mean I need to learn various type of way to move one view to another using animation (left to right or up to down or no animation or down to up) .

Check my code here
http://goo.gl/Q2k6mf

click preview button .And type "ABW" and select "ABW" row .it download data from server and after that it move to second view with sliding why ? I need to stop that sliding .

Secondly I am downloading the data in first controller .is there any better way to hit server or call webservice before moving to second view ?

   $scope.rowclick=function(station){
     $scope.SEARCH.stationCode=station.stationCode;
     $scope.SEARCH.selected = true;


            $ionicLoading.show();
            $http.get("http://caht.firstrail.com/FGRailApps/jservices/rest/a/departure?crsCode="+ $scope.SEARCH.stationCode).then(function(data){
                $ionicLoading.hide();
                 $state.go('departuredashboard')
                console.log(data);
            },function(error){
                $ionicLoading.hide();
                alert("error"+error);
            })
   } 

Actually I need that data on second view ? here is code https://dl.dropbox.com/s/l2dtrxmnsurccxt/www.zip?dl=0

Karan Kumar

I don't know why you want to remove that animation, Its so sweet, but here you go.

app.config(function($stateProvider, $urlRouterProvider,$ionicConfigProvider){
     $ionicConfigProvider.views.transition('none')
          // rest of the config    
})

Edit: For your second question: here is a code snippet as to how to use resolve of ui-router

.state('stateName',{ 
 url:'/SomeUrl',        
resolve: {
       resolvedData: function ($http) {
         var result = $http.get(yourUrlHere).success(function (data) {
                         return data;
                      }).error(function (err) {
                         return err;
                      });
                         return result;
                }
         }
  })

And in your controller , inject "resolvedData"

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Moving from one window to another

How to run a fadein effect halfway while a div is animating?(moving up)

Moving the contents of one vector to another

How to avoid to run the event "mouseout" while another element was moving in?

How to remove words from one dataframe that are not in another

How to stop moving one line down while commenting in PhpStorm?

Remove Gesture for view while Sliding Menu Activated

How to know if two images are intersect while one image moving in android?

Moving one window to another in titanium

Issue while using moving effect on slider

How to moving your developed workflow solution one server to another server?

Remove carousel sliding in one page

Sliding one layout on another in android

Swift - How to remove swipe gesture from scene when moving to another one?

How to make transition effect from one image to another with jQuery?

Ionic - display SideMenu while moving between states

How to remove single quote in filename while moving to the file using php

jump effect while moving rotated rectangle

How to restore grub when moving an image from one computer to another

Remove elements of one list from another list using "while"

How to pass one state value to another state on initialization in react js

Error while moving the file from one folder to another using shutil

How to update one plot as mouse moving over another?

How to automate moving data from one google sheet to another

How to replace animation state or copy transition from one state to another

How to replace a moving <img> with another one during movement using JavaScript?

How do I point a gameobject towards another one, while it's rotating around a moving player?

How do I stop the moving of a button while clicking another?

How to add sliding effect for accordion menu in Javascript?

TOP Ranking

HotTag

Archive