In Salesforce.com with angular.js app. How do I load a zipped file into staticresource without the .zip extension? I installed the angular mobile pack from https://developer.salesforce.com/mobile/getting-started/html5/#angular. and am trying to modify the app.js in the static resource and load it back up.
2 Answers
Generally, you can refer to files inside the resource using URLFOR.
<apex:includeScript value="{!URLFOR($Resource.angular, 'app.js'})" />
It's also possible to reference it by direct URL, but I'd probably avoid doing that for future compatibility.
Other JS/CSS files that are in the zip file should be able to reference each other so long as they use relative references.
sfdcfox answered part of your question, the other implied question was how to modify specific files within the compressed resource and then load them back into Salesforce.
MavensMate for Sublime Text has a great feature called resource bundles which addresses this exact use case. Would highly recommend it: http://www.joe-ferraro.com/2012/12/mavensmate-resource-bundles/
-
Thank you, I really appreciate the answer. We are currently evaluating MM. I think it is much better than Force.com IDE but I have to sell my team. Commented Jan 30, 2015 at 13:02