dynamic store proxy url
on my local, the path to my 'in development' server side api is different than our production api. I need to be able to switch the prefix of my store proxys. the problem i'm having is that i can't put a variable into the URL property of the proxy using the Designer... easily done outside the designer.
Is there a workaround or best practice?
I'm guessing relative url's are not going to work for you, as in development you're api isn't in the same domain as your application. I usually set the proxy url's explicitly in code before use; here you can of course use var for base-url, which you can set once at launch. I don't love the solution, but it works for me.
Thanks, Joost. I decided to change the url of the stores proxy in the stores beforeLoad event. Would be much more convenient if a variable could be added to the url property in the designer pane but for now... it's easy to implement.