jakubrohleder / angular-jsonapi

Simple and lightweight, yet powerful ORM for your frontend that seamlessly integrates with your JsonAPI server.
http://jakubrohleder.github.io/angular-jsonapi/
GNU General Public License v3.0
96 stars 34 forks source link

How can I reset or change a sourceRest #40

Closed pablorsk closed 8 years ago

pablorsk commented 8 years ago

We need change the sourceRest in some case.

This is becouse we have a particular URL for each user, for example: http://example.com/api/[user_loggued_id]/products

var restSynchro = $jsonapi.sourceRest.create('Rest synchronization',
                     'http://example.com/api/' + userid + '/products');

The var userid can change anytime, and we need change the REST URL.

Any ideas?

max-SS commented 8 years ago

+1

pablorsk commented 8 years ago

Solution: redefine jsonapi resourse again.