Skip to content

String template evaluation capability in amp-mustache  #23530

@AndrewKGuan

Description

@AndrewKGuan

Very often client-side text templating is very useful. It is consisted of a string template and key-value map fetched in the form of json objects.
Example:
{"template" : { "message" : "Hello [name], today's weather is [weather]!"}}

{"values" : {"name" : "Mickey", "weather" : "sunny"}}

The outcome: "Hello Mickey, today's weather is sunny!"

Currently this is not doable using amp-list and amp-mustache because values inside a json response is not evaluated, also amp-list cannot be nested.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions