Struggling with setting up AngularJS routing for a website within a subdirectory of another site. Each time I click on a link, the URL displays unwanted characters #!/ before the page name, causing unexpected redirections. Here's a snippet of the code:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" data-ng-app="app">
...
And here is the script.js file:
var app = angular.module("app", ["ngRoute", "ngAnimate", "ui.bootstrap"]);
app.config(function ($routeProvider) {
$routeProvider
.when("/", {
templateUrl: "main.html"
})
...
});
Despite setting the base URL in the head section, the issue persists. This is my first attempt at configuring Angular routing for a subdirectory - am I overlooking something? How can I eliminate these unwanted characters and navigate to pages smoothly without URL interference?
Your assistance would be greatly appreciated.