Hello Everyone,

I am unable to get the autoscroll to work for newer Android devices, 
especially the S7 and above. I am not sure why.

The following is the controller:
(
function(){
var $scope, $location, $anchorScroll;
var indexApp = angular.module('indexApp',['ui.bootstrap', 'ngSanitize']);

indexApp.controller('IndexController',function($scope,$http,$location,$anchorScroll,anchorSmoothScroll){

and the following is were I am actually using the autoscroll:

$scope.providers = response.data.provider;
$scope.resultsCount = response.data.rowCount;
if (navigator.userAgent.match(/Android/i) || 
navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) 
||
navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || 
navigator.userAgent.match(/BlackBerry/) 
|| 
navigator.userAgent.match(/Windows Phone/i) || 
navigator.userAgent.match(/ZuneWP7/i) || 
navigator.userAgent.match(/SAMSUNG|SGH-[I|N|T]|GT-[I|P|N]|SM-[N|P|T|Z|G]|SHV-E|SCH-[I|J|R|S]|SPH-L/i))
 
{
if (!$scope.providers){
$scope.NoResults = true;
$scope.ShowResults = false;
$scope.ShowDesc = false;
$location.hash('error');

// call $anchorScroll()
$anchorScroll('error');
}
else {
$scope.NoResults = false;
$scope.ShowResults = true;
$scope.ShowDesc = false;
$location.hash('ResultsAnchor');

// call $anchorScroll()
$anchorScroll('ResultsAnchor');
}
}
else{
if (!$scope.providers){
$scope.NoResults = true;
$scope.ShowResults = false;
$scope.ShowDesc = false;
}
else {
$scope.NoResults = false;
$scope.ShowResults = true;
$scope.ShowDesc = false;
} 
}


Any help would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to