$scope.imgSrc = '1.jpg';
$scope.next = function(){
var num = parseInt($scope.imgSrc.substring(0,$scope.imgSrc.indexOf('.')));
num = num<4 ? num+1 : 1;
$scope.imgSrc = num+'.jpg';
}
$scope.prev = function(){
var num = parseInt($scope.imgSrc.substring(0,$scope.imgSrc.indexOf('.')));
num = num<2 ? 4 : num-1;
$scope.imgSrc = num+'.jpg';
}