1

While dveloping my AngularJS app on my local WAMP server it resides in:

http://localhost/Projects/myLaravelProject/public/

When calling routes as

$http.post("/login", sanitizeCredentials(credentials));

It is trying to access

http://localhost/login

and obviously getting a 404 error, i have no idea how to overcome this. Im using Hashbang mode not HTML5 mode

4
  • are you using real html5 mode or hashbang? Commented Jul 4, 2013 at 12:42
  • hashbang mode not html5 mode Commented Jul 4, 2013 at 12:42
  • 1
    I guess this is relevant when you define links and routes with routeprovider. wouldn't it be alright (but noisy...) to have a service with a constant that is just your base url? or just configure properly your server so that the root is the root and not "Projects". and a quick check: try '#/login' Commented Jul 4, 2013 at 12:47
  • i do like that solutions although i think the best case is ashit's making a virtual host. Commented Jul 4, 2013 at 13:47

1 Answer 1

1

Why don't your create a virtual host? so your url will be yourapp.dev and angular will make request to yourapp.dev/login which is correct.

Or else if you are using Laravel4, use PHP Development Server

php artisan serve

that's what I do always.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.