everyone. Has anyone else encountered jQuery console errors when routing to new views with AngularJS?
An example of the error is
Uncaught Error: Syntax error, unrecognized expression: #/projects/project-id
Everything still works, but that error gets thrown whenever a link is clicked that is related to my Angular routing. The error shows up attributed to jQuery, so I assume it's an issue with it not liking links starting with "#/"
HTML
<div class="project" ng-repeat="project in projects">
<a href="#/projects/{{project.id}}">
<h4>{{ project.name }}</h4>
<p>{{ project.subtitle }}</p>
</a>
</div>
JS
app.config(function ($routeProvider) {
$routeProvider
.when('/', {
controller: "HomeController",
templateUrl: "js/angular/views/home-view.html"
})
.when('/projects/:projectId', {
controller: 'ProjectController',
templateUrl: 'js/angular/views/project-view.html',
})
.otherwise({
redirectTo: '/'
});
});
The console error isn't a showstoppper, because like I said, everything still works. But if anyone has encountered this before and has a fix, I'd really appreciate it.