How to remove index.html from url on website based on angularjs

前端 未结 4 2184
醉梦人生
醉梦人生 2021-02-19 07:21

I didn\'t find a way to remove index.html from the url, because like this looks really ugly.

mydomain.com/index.html#/myview1 
mydomain.com/index.html#/myview2
<         


        
4条回答
  •  独厮守ぢ
    2021-02-19 07:37

    Use

    
        
            
                
                
                    
                    
                    
              
              
          
      
    
    

    And on Index page

     
    

    And on your config use

    $locationProvider.html5Mode(true);
    

    It should work

提交回复
热议问题