$routeParams Hard Refresh not working on server (base tag needed)

后端 未结 2 1066
滥情空心
滥情空心 2020-12-11 18:01

Here is my .htaccess file:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -         


        
相关标签:
2条回答
  • 2020-12-11 18:20

    Ok. In your index.html I see that there are multiple nested html elements with same controller. If you have applied the ng-controller="main" to your <body> tag then its not needed to add it again to its nested elements (child elements of body tag). Due to this nested scope of one single controller, it may cause the problems which you face.

    Just add the controller to your body tag alone, or add a parent div which contains all that body contains, and then assign the controller to this parent div. And remove the redundant controller from other places.

    0 讨论(0)
  • 2020-12-11 18:28

    If anyone runs into a similar problem to this one, make sure that you put your

    <base href="/">

    At the top of your index.html file, directly underneath the title.

    That's what eventually solved it for me.

    0 讨论(0)
提交回复
热议问题