AngularJS routing not working after site hosted into IIS

前端 未结 4 899
暗喜
暗喜 2020-12-18 10:17

We are creating SPA technique using AngularJS in ASP.NET MVC framework,AngularJS routing between pages are working fine when it\'s run from VS2013,but after hosting the appl

4条回答
  •  别那么骄傲
    2020-12-18 10:52

    you have to edit a web.config file to do the rewrite and on the index like this no app name and the refresh will work fine using the web.config file

    
     
    
        
          
            
                    
                    
                        
                        
                        
                        
                    
                    
                    
            
         
        
            
            
                      
        
        
            
                      
            
        
    
    

    I fix it using this in order for the HTML5 mode to work. keep in mind that this settings might not work on your localhost server if you are running the application from the root folder

提交回复
热议问题