javascript - angular 1.3.15 html5mode deeplinking, route, hash -
i enabled html5mode true
, placed <base href="/">
inside head tag. seems working fine. when refresh page, gives me error.
the requested url /updated_1/work not found on server.
found in post.
this problem due use of angularjs 1.1.5 (which unstable, , had bug or different implementation of routing in 1.0.7)
turning 1.0.7 solved problem instantly.
have tried 1.2.0rc1 version, have not finished testing had rewrite of router functionality since took out of core.
anyway, problem fixed when using angularjs vs 1.0.7.
using old version gives more error. though use latest version. i'm using angularjs v1.3.15.
is problem angular version? can 1 suggest best solution.
thanks
you need allow direct-linking of pages can processed angular. if don't this, when user refreshes, blank screen.
create .htaccess file inside folder, , paste in ( assuming main file named index.html ).
<ifmodule mod_rewrite.c> rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !index rewriterule (.*) index.html [l] </ifmodule>
if problem still persist, let me know.
Comments
Post a Comment