Forum Discussion
Adaptive Card Templating for JavaScript @ 2.3.1
We will check this at our end and will get back to you.
From version 2.0 on, adaptivecards-templating doesn't embed adaptive-expressions anymore, and it is the responsibility of the consuming application to explicitly load this package.
Ref Document-https://www.npmjs.com/package/adaptivecards-templating
- AnonymousMar 06, 2023
Sayali-MSFT , thank you for your reply.
Yes - that is how it was described and of course I am aware of it. My question is in the direction of how I can include the adaptive-expressions and so also use it with adaptivecards-templating. Simply adding adaptive-expressions with npm does not work. It would be very helpful if I have an example of this.Currently this is my configuration of the modules
I include the modules in the HTML page as follows.
It is not clear to me now if I have to include the adaptive-expressions explicitly? In the TS code I have seen that actually the adaptive-expressions is automatically included via import. However, also an attempt to include the module adaptive-expressions manually did not bring the desired success.
- AnonymousMar 15, 2023can no one help me?
Probably I'm just doing something wrong!
Would be grateful for any help. Also gladly an example code.
I suspect I'm just doing something wrong when including adaptive-expressions. In the code an exception is generated when addressing the instance AES.- Sayali-MSFTMar 15, 2023
Microsoft
Deleted - Sorry for delay in response, please refer the below sample -
here we can use the below version-
"adaptive-expressions": "^4.18.0",
"adaptivecards-templating": "^2.3.1"const { ActionTypes, CardFactory, MessageFactory, TeamsActivityHandler, TeamsInfo, TurnContext } = require('botbuilder'); const TextEncoder = require('util').TextEncoder; const ACData = require('adaptivecards-templating'); const template = new ACData.Template(AdaptiveCardTemplate);