I am encountering an issue with my normal routeprovider code. In a specific section of my HTML, I have some Twitter Bootstrap expand/collapse sections which inadvertently trigger the routeprovider when clicked. Is there a way to prevent this from happening?
myApp.config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'login.html',
controller: 'mainController'
})
.when('/projects', {
templateUrl: 'project.html',
controller: 'projectController'
});
$locationProvider.html5Mode(true);
});
This is the section of HTML causing the issue:
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
Open Projects
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<div class="panel-body">
<table id="openProjectTable" class="table">
<tr><th>Project</th><th>Source</th><th>Target</th></tr>
</table>
</div>
</div>
</div>