I started using Angular recently and immediately ran into such a problem when using routing: when I connect the angular-route.min.js library to the site, then all my routes of the type # / route turn into #% 2Froute , that is, because the character / is encoded in % 2F, everything stops working. How can this be fixed? Here is an example:
<!DOCTYPE html> <html ng-app="myApp"> <head> <title>Angular Routes Test</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0/angular-route.min.js"></script> </head> <body> <a href="#/">Home</a> <a href="#/test">Test</a> <a href="#/route">MoreTest</a> <div ng-view></div> <script type="text/javascript"> var app = angular.module('myApp', ['ngRoute']); app.config(function($routeProvider, $locationProvider) { $routeProvider .when('/', { template: '<h1>Home</h1>' }); $routeProvider.when('/test', { template: '<h2>Test</h2>' }); $routeProvider.when('/route', { template: '<h1>MoreTest</h1>' }); $routeProvider.otherwise({ redirectTo: '/' }); }); app.controller('testController', function($scope) {}); </script> </body> </html> Before the example, I used angular version 1.6.0, in example 1.6.1