简体   繁体   中英

How to access alfresco global property from a share client-side javascript?

I have the following property in my alfresco-global-properties file.

customAction.enabled=true

I want to access this value from custom-actions.js file in share. What is the best and easiest way to do achieve this? Can I use rootScope variable in this case?

You can't access alfresco-global-properties from the javascript api for security reasons. Either you implement your custom getter in Java and expose that to javascript or you store your required config in a specific content node which will be accessable from javascript.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM