-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.js
45 lines (37 loc) · 1.41 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
var app = angular.module("slider-angular-app", [
'ngAnimate'
]);
app.controller("rootCtrl", ['$rootScope', '$scope', function($rootScope, $scope) {
$scope.textSelector = "hello this is a temp";
$scope.country_id = $scope.state_id = $scope.city_id = null;
$scope.slides = [
{ image: 'assets/images/image1.jpg', description: 'Image 00' },
{ image: 'assets/images/image2.jpg', description: 'Image 01' },
{ image: 'assets/images/image3.jpg', description: 'Image 02' },
{ image: 'assets/images/image1.jpg', description: 'Image 03' },
{ image: 'assets/images/image2.jpg', description: 'Image 04' }
];
$scope.getAlldata = function(){
console.log($scope);
}
}]);
app.animation('.slide-animation', function() {
return {
addClass: function(element, className, done) {
if (className == 'ng-hide') {
TweenMax.to(element, 0.5, { left: -element.parent().width(), onComplete: done });
} else {
done();
}
},
removeClass: function(element, className, done) {
if (className == 'ng-hide') {
element.removeClass('ng-hide');
TweenMax.set(element, { left: element.parent().width() });
TweenMax.to(element, 0.5, { left: 0, onComplete: done });
} else {
done();
}
}
};
});