Forum Discussion

Mikel85570's avatar
Mikel85570
Copper Contributor
Mar 03, 2023

Adaptive Card Templating for JavaScript @ 2.3.1

Hello all,
I am desperately trying to use the latest version of the module adaptivecards-templating

--> https://www.npmjs.com/package/adaptivecards-templating?activeTab=versions.

 

So far I used the version 1.4.0. In this version was included the module adaptive-expression.
From version 2.0.0 the module adaptive-expression must be installed additionally.

I have also done that. However I get an exception that it becomes undefined.

Does anyone know how I can use the latest version 2.3.1 of adaptivecards-templating with adaptive-expression. As soon as I use the version 1.4.0 of adaptivecards-templating everything is good.

 

thank you in advance

mike

 

    • Sayali-MSFT's avatar
      Sayali-MSFT
      Icon for Microsoft rankMicrosoft
      Mikel85570 -As per Document, Before version 2.0, the adaptivecards-templating package embedded a full copy of the adaptive-expressions package. This model didn't allow an application to use Adaptive Card templating with a more recent version of adaptive-expressions, and bug fixes in adaptive-expressions would always have to be accompanied with a new release of the adaptivecards-templating package.

      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
      • Mikel85570's avatar
        Mikel85570
        Copper Contributor

        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.

         

Resources