Hello,
I have started working on a similar application like you are developing or
developed. I can not understand how to develop subdomain based applications
in angularJS and nodeJS. I have developed separate restful API's in nodeJS
and frontend in angularJS. Can you please guide me how to develop subdomain
based applications with angularJS and nodeJS ?.
On Thursday, March 7, 2013 at 8:56:18 PM UTC+5:30, Astronaute wrote:
>
>
> Hello,
>
> I have an Angular web application on "www.foo.com" with the server API
> accessible on "*api*" subdomain: "api.foo.com".
>
> I have different environments (dev, staging, prod...) each deployed on
> their own domain (www.foo-dev.com, www.foo-staging.com, www.foo.com).
> Server API is always relative to that domain (api.foo-dev.com,
> api.foo-staging.com, api.foo.com).
>
> I'm trying to specify the subdomain for $resource in Angular services so
> they can request the service API on the "*api*" subdomain.
> Actually my services are made this way, and I cannot find a way to tell
> the resource to use the "*api*" subdomain:
>
>
>
> *myServices.factory("ProductService", ($resource) -> return
> $resource("/products/:productId", {productId:"@productId"}))*
>
> I'm coming from Rails where we can put a subdomain constraint on any route
> or URL simply like this:
> *:constraints => { :subdomain => 'api' }*
>
> How can this be achieved using Angular $resource please?
>
> Thank you for your help!
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.