The problem of %2F in the routing path in angular js

1. Problem description:
    1. Initialize routing: 1. % wrong path: http://localhost:9000/#!/#%2F
                    2. Correct path: http://localhost:9000/#/
    2. Error Routing: 1. % wrong path: http://localhost:9000/#!/#%2Fabout
                    2. Correct path: http://localhost:9000/#/about
2. Reason: when the route jumps, # Transcoding
3. Solution: Add configuration in app.js file
//Add the following configuration.config
    (['$locationProvider', function($locationProvider) {
        $locationProvider.hashPrefix("");
    }]);




try efficient! ! !

Reference link: https://segmentfault.com/q/1010000009574420

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325388191&siteId=291194637