ui-router中增加
$locationProvider.html5Mode(true);
RewriteEngineOn #Ifanexistingassetordirectoryisrequestedgotoitasitis RewriteCond%{DOCUMENT_ROOT}%{REQUEST_URI}-f[OR] RewriteCond%{DOCUMENT_ROOT}%{REQUEST_URI}-d RewriteRule^-[L] #Iftherequestedresourcedoesn'texist,useindex.html RewriteRule^/index.html
<basehref="/">原文链接:https://www.f2er.com/angularjs/146190.html