-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (52 loc) · 1.53 KB
/
index.html
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
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en" data-ng-app="testApp">
<head>
<meta charset="UTF-8">
<title>Demo Carousel</title>
<link rel="stylesheet" href="OwlCarousel/owl-carousel/owl.carousel.css">
<link rel="stylesheet" href="OwlCarousel/owl-carousel/owl.theme.css">
</head>
<body data-ng-controller="testController">
<div class="owl-carousel">
<a href="#" data-ng-repeat="image in images track by image.id"><img data-ng-src="{{image.url}}" /></a>
</div>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="OwlCarousel/owl-carousel/owl.carousel.js"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script>
'use strict';
var app = angular.module('testApp', []);
app.controller('testController', function($scope, $timeout){
$scope.images = [
{
id: 1,
url: 'images/2.png'
}, {
id: 2,
url: 'images/2.png'
}, {
id: 3,
url: 'images/2.png'
}, {
id: 4,
url: 'images/2.png'
}, {
id: 5,
url: 'images/2.png'
}, {
id: 6,
url: 'images/2.png'
}, {
id: 7,
url: 'images/2.png'
}, {
id: 8,
url: 'images/2.png'
}];
$timeout(function(){
$(".owl-carousel").owlCarousel();
});
});
</script>
</body>
</html>