0

I am using server side google oauth in angular.js,

Suppose my redirect url is localhost:8000/redirect. To remove # in angularjs I am using

$locationProvider.html5Mode(true);

But, when i visit the url I get an error :

Error response

Error code 404.

Message: File not found.

Error code explanation: 404 = Nothing matches the given URI.

However if I type the url manually i.e localhost:8000/#redirect then I get what I expected and then redirects to localhost:8000/redirect

I have also tried to add # from Google app console. But, that is not allowed.

So how to remove hash completely ?

3
  • what are you using for server side?? Commented Jul 29, 2014 at 17:18
  • On server side you shall return layout html file in any case, something like this in nodejs: app.get('*', function(req, res){ res.sendfile('/views/layout.html'); }) Commented Jul 29, 2014 at 17:22
  • I am using angularjs partials , and partials are working perfectly with "#" Commented Jul 29, 2014 at 17:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.