Programmatically Scroll to Bottom of the page in Ionic Android application - Cordova

It simple to scroll to the bottom of the page in ionic. $ionicScrollDelegate is used to scroll to bottom and top of a page programmatically in Ionic. Use the following code to scroll to the bottom.

Sample Code:

$ionicScrollDelegate.scrollBottom();

The above code will jump to the bottom of the screen. If you with to have a smooth scroll effect just use the below one,

$ionicScrollDelegate.scrollBottom(true);

Example Program:

The controller Code part is given Below

var myApp = angular.module("myApp", []);
        myApp.controller('myController', function( $ionicScrollDelegate) {
            $ionicScrollDelegate.scrollBottom();
        }
});

 

Category: