3

I'm attempting to use Angular Routing to handle all of my public facing pages. It creates a pretty smooth experience for the customers, and I have gotten it working on my development machine, but now, moving it to production, I have to direct any URL requests from the SalesForce Site to go to the main "/" page to have the routing handled by angular.

Everything works properly when I go to my main page, then select links from there. The issue is when I try to directly link to an internal page (which is common in this application). Right now, I get a 404, because the VisualForce "server" is trying to fulfill a link request that only my angular app knows about.

Is there any way to use wildcards in

apex global class kbUrlControl implements Site.UrlRewriter { global PageReference mapRequestUrl (PageReference ) global PageReference[] generateUrlFor(PageReference[] ) }

I basically just need to send all Urls to "/' - Just not sure how to do it.

Explicitly naming all Urls to redirect isn't going to be feasible, I have over 40k of them to deal with.

3

A workaround for this is to make the index page of the angular app the "default template" for the site. This will enable you to use Angular's routing capabilities.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.