有没有办法将配置参数传递给 Outlook 插件 [英] Is there any way to pass configuration parameters to an Outlook Addin

查看:97
本文介绍了有没有办法将配置参数传递给 Outlook 插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 JS Outlook 插件,我希望能够将其部署到多个站点,但如果可能,我希望将相同的代码部署到每个站点并在外部处理配置数据.类似于 process.env (适用于 Node.js 服务器应用程序)的客户端应用程序.我发现可以在 Azure 中定义应用程序设置,但如何访问应用程序中的值?

I have a JS Outlook Add-in that I'd like to be able to deploy to multiple sites, but I'd like to deploy the same code to every site and handle configuration data externally, if possible. Something like process.env (that works for a Node.js server App) for a client App. I see it's possible to define Application Settings in Azure, but how can I access the values in the App?

推荐答案

感谢 Outlook 插件团队,工作正常;为了其他读者的利益,一些细节

Thanks Outlook Add-ins Team, that works fine; for the benefit for any other readers, a few details

  1. 使用 URLSearchParams() 可以轻松提取目标 JS 中的参数值
  2. 此解决方案将客户差异集中在清单中,将大部分解决方案保留在 JS 中,所有部署都相同,这是一个关键目标
  3. 顺便说一句:使用 ~remoteAppUrl 可以将客户对 Manifest 的差异减少到最低限度

这篇关于有没有办法将配置参数传递给 Outlook 插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆