Can we add a prefix to the # symbol in angular.js URLs?
For instance:
let's say we have a site: http://example.com/ then
when I click on the CSharp page, it redirects to http://example.com/#/csharp
when I click on the AngularJS page, it redirects to http://example.com/#/angularjs
Now, I would like to add a prefix of "language" before the # symbol so that the URLs become –
when I click on the CSharp page, it redirects to http://example.com/language#/csharp
when I click on the AngularJS page, it redirects to http://example.com/language#/angularjs
Below is a sample code snippet that generates the mentioned output –
var angularApp= angular.module('MyApp', []);
angularApp.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl : 'partials/home.html',
})
.when('/csharp', {
templateUrl : 'partials/csharp.html',
})
.when('/angularjs', {
templateUrl : 'partials/angularjs.html',
});
});