I have successfully created a responsive image slider using CSS. I followed the example provided here: . The slider works automatically, but whenever I click on the carousel, instead of sliding to the next image, it redirects to another page. How can I prevent this behavior? Could it be due to a conflict with AngularJS?
Below is the code for the slider:
<div id="thumbnail-preview-indicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#thumbnail-preview-indicators" data-slide-to="0" class="active">
<div class="thumbnail">
<img class="img-responsive" src="../assets/images/abstract_wallpaper_1.png" />
</div>
</li>
<li data-target="#thumbnail-preview-indicators" data-slide-to="1">
<div class="thumbnail">
<img class="img-responsive" src="../assets/images/435523.jpg" />
</div>
</li>
<li data-target="#thumbnail-preview-indicators" data-slide-to="2">
<div class="thumbnail">
<img class="img-responsive" src="../assets/images/wallpaper-1356336.jpg" />
</div>
</li>
</ol>
<div class="carousel-inner">
<div class="item slides active">
<div class="slide-1"></div>
<div class="container">
<div class="carousel-caption">
<h1>Hello! How are you today?</h1>
<p>This is slide 1. Moving on...</p>
<p><a class="btn btn-lg btn-primary" href="#/" role="button">I'm Good</a></p>
</div>
</div>
</div>
<div class="item slides">
<div class="slide-2"></div>
<div class="container">
<div class="carousel-caption">
<h1>Welcome back! How can I help you?</h1>
<p>This is slide 2. Let's continue...</p>
<p><a class="btn btn-lg btn-primary" href="#/" role="button">Great! Thank you.</a></p>
</div>
</div>
</div>
<div class="item slides">
<div class="slide-3"></div>
<div class="container">
<div class="carousel-caption">
<h1>Nice to see you again! Do you need anything?</h1>
<p>This is slide 3. The final one!</p>
<p><a class="btn btn-lg btn-primary" href="#/" role="button">Yes, peace :)</a></p>
</div>
</div>
</div>
</div>
<a class="left carousel-control" href="#thumbnail-preview-indicators" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
<a class="right carousel-control" href="#thumbnail-preview-indicators" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div>
This is the content of app.js:
'use strict'
var app = angular.module('myWeb',
[
'ngRoute'
]);
console.log('app');
app.config(['$routeProvider', '$httpProvider', function ($routeProvider, $httpProvider) {
$routeProvider
.when('/',{
templateUrl: 'home.html',
controller: 'HomeController'
});
$routeProvider
.when('/signup',{
templateUrl: 'signup.html',
controller: 'SignupController'
});
$routeProvider
.when('/contact', {
templateUrl: 'contact.html',
controller: 'ContactController'
});
$routeProvider
.when('/about',{
templateUrl: 'about.html',
controller: 'aboutController'
});
$routeProvider
.when('/t-and-c-m',
{
activatetab: '#t-and-c-m'
});
}]);
Do I need to make any additional configurations in AngularJS to address this issue? Any guidance would be greatly appreciated since I am relatively new to AngularJS.
Here is the CSS associated with the question:
#thumbnail-preview-indicators {
position: relative;
overflow: hidden;
}
#thumbnail-preview-indicators .slides .slide-1,
#thumbnail-preview-indicators .slides .slide-2,
#thumbnail-preview-indicators .slides .slide-3 {
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
...
<!-- Additional CSS styling continues -->