Locally compiled files can function correctly, but after the server compiles to the test there is a sense of the routing /#!/
, which leads to a lot of problems.
Later, it was the server compiler to upgrade the ANGULARJS to version 1.6, and my local is still 1.5.
But what changes did the 1.6 make?
can refer to this: https://github.com/angular/angular.js/commit/aa077e81129c740041438688dff2e8d20c3d7b52
You can see a lot more /#!/
changes in it.
This can be done if you want the route to still behave in a way that is consistent with previous versions:
app..config(function($stateProvider, $urlRouterProvider,$locationProvider){ $locationProvider.hashPrefix(‘‘);}
1 App: Config (function($stateProvider, $urlRouterProvider, $locationProvider) {2 $ Locationprovider.hashprefix ("); 3 }
Reference: Http://stackoverflow.com/questions/41211875/angularjs-1-6-0-latest-now-routes-not-working
Https://docs.angularjs.org/guide/migration#commit-aa077e8
Workaround for/#!/in Ui-router routing in AngularJS1.6 version-Zhuan