我在 OSGi 模块下定义 AMD 模块。我必须阅读AMD 加载程序定义中的主机属性。如何从 portal-ext.properties 文件中读取属性?
下面是我如何在 portal-ext.properties 文件中定义 AMD 模块和属性的示例代码。
门户-ext.properties
# host detail
host={{host_url}}
定义 AMD 模块
Liferay.Loader.define('genelec-shopping-cart', [], function(){
const host = ""; //here i have to read the property
return{
getHost:function(){
return host;
},
};
});