I wrote a simple routing on an angular, but the path looks strange, for example: http://127.0.0.1:61257/index.html#!#%2Fnew instead of the expected http://127.0.0.1:61257/index.html#/new

What could be the problem?

Js:

app.config(function($routeProvider){ $routeProvider .when("/new", { template: "<h1> Новые </h1>" }) }); 

HTML:

  <nav> <ul class="tabs"> <li><a href="#/new">Новые</a></li> <li><a href="#/underway">В работе</a></li> <li><a href="#/inProcessing">На рассмотрении</a></li> <li><a href="#/done">Выполнены</a></li> <li><a href="#/decline">Отменены</a></li> <li><a href="#/draft">Черновики</a></li> <hr> </ul> </nav> 

I connect the scripts to the head in this order:

  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular-route.min.js"></script> <script src="scripts/index.js"></script> <script src="scripts/controllers.js"></script> <script src="scripts/filters.js"></script> <script src="scripts/routers.js"></script> 
  • one
    I don’t shave in the Angular, but the first query in Google gave the answer to stackoverflow.com/questions/41272314/… , look, we can help you - Oleksandr
  • one
    in Angular 1.6 they changed # to #! - Komdosh
  • helped, thanks - Silento
  • issue as answer, one of you - Silento
  • use @uirouter/angularjs . More possibilities, the developers of the angulyar themselves advise - jashka

0