将服务映射到 Appery.io HTML 组件和变量
有没有办法获取连接到 Appery 数据库的服务并将其映射到 HTML 页面组件或变量?
我已成功设置连接到我的 Appery.io 数据库的服务,并将其映射到页面。
我可以将内容获取到文本和图像组件中,但将字符串映射到 HTML 组件似乎不起作用,将字符串映射到该页面上设置的变量(作为字符串键入)也不起作用。我也尝试将 $[i] 对象映射到 HTML 对象,但这似乎没有改变任何东西。
我尝试将几个不同的列映射到变量和 HTML 组件,甚至成功映射到其他组件的列也不会导致页面上显示任何内容。作为尝试查看发生情况的一种方法,我使用了“日志值到控制台”转换,但变量或 HTML 组件的控制台中没有显示任何内容。
Is there a way to take a service that connects to an Appery database and map it to an HTML page component or a variable?
I have successfully set up a service that connects to my Appery.io database and I'm mapping it to a page.
I can get content into Text and Image components, but mapping a string to the HTML component doesn't seem to work, nor does mapping a string to a variable set up on that page (typed as a string). I tried mapping the $[i] object to the HTML object as well, but that didn't seem to change anything.
I tried mapping a couple different columns to the variable and the HTML component and even the ones that successfully map to other components don't result in any content showing on the page. As a way of trying to see what was going on, I used the "log value to console" transformation and nothing shows up in the console for the variable or HTML component.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本映射无法用于此目的,因此请使用以下解决方法:
请添加两个自定义包含(SafeHtml 和 DomSanitizer)并基于它们定义变量:
在 HTML 组件上添加属性 [innerHtml]:
The basic mapping won't work for that purpose, so please use the following workaround:
Please add two custom includes (SafeHtml and DomSanitizer) and define variables, based on them:
On the HTML component add the property [innerHtml]: