Closed lakinmohapatra closed 6 years ago
Thanks @lakinmohapatra I'm glad you like it 😄 What are some features that you expect to see in this package? Keeping in mind that they should be useful for most of the users, rather than specific use cases
How would you call endpoints without using the full url of laravel?
Example
This does not work
getAll(): Observable {
return this.http
.get('api/posts')
.map(response => response.json());
}
This works
getAll(): Observable {
return this.http
.get('http://laravel.dev/api/posts')
.map(response => response.json());
}
Project structure
app
bootstrap
angular
e2e
node_modules
src
app
assets
.......
config
database
public
resources
Correct me if I am wrong, is the goal of this package is to use angular and laravel as a single project, in same domain, deploy to production not as a separate files?
Thanks
Hi @ianrussel Yes the only way is to always prePend the base URL. The goal of this package is to make it easier to use Laravel & Angular but not necessarily in a single project. I'd recommend separating them but you could decide to combine them.
However in order to solve your problem, I'd recommend creating your own API
class that wraps the fetch API and automatically uses the base URL, here's a gist to implement that:
You guys are doing good work .
Keep up good work.
We are waiting for new features