angular.js - How to append the status to the secondary path by removing # in Angularjs?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-15 16:53:39
0
3
1071

I now have a URL like this: http://172.25.186.1/wxHome/www/#/tabs/index
After setting $locationProvider.html5Mode(true);, in theory the URL should become like this: http://172.25.186.1/wxHome/www/tabs/index
But the actual situation is this: http://172.25.186.1/tabs/index

The routing configuration is as follows:

 $stateProvider.
        state('kjk', {//框架页
            url: "/",
            controller: "KJK.rootController",
            templateUrl: baseUrl+"views/templates/kjk_Main.html"
        }).
        state('kjk.tabs', {//tabs框架页
            url: "tabs",
            controller: "KJK.tabsController",
            templateUrl: baseUrl+"views/templates/kjk_Tabs.html"
        }).
        state('kjk.tabs.index', {//首页
            url: "/index",
            views: {
                'index_tabs': {
                    controller: "KJK.index.indexController",
                    templateUrl: baseUrl+"views/kjk_index.html"
                }
            }
        })

HTML

<base href="/" />

How can I add routing information to my http://172.25.186.1/wxHome/www/之后?

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(3)
迷茫

Change the content of base to:

<base href="/wxHome/www/" />

That’s it.

phpcn_u1582

You can consider adding a base tag to the page

巴扎黑

Is the problem solved?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template