Twig amp list src url未获取数据

Twig amp list src url未获取数据,twig,amp-list,Twig,Amp List,我在细枝文件中使用amp列表创建选择下拉列表。但是细枝文件在{{{countries}行中抛出了一个错误字符“#”。当这一行被注释掉时,url会正确地获取数据。请参阅下面的代码:- <section class="card"> <h2>Country</h2> <amp-list src="https://ampbyexample.com/json/cart.json" layout="fixed-height" heig

我在细枝文件中使用amp列表创建选择下拉列表。但是细枝文件在{{{countries}行中抛出了一个错误字符“#”。当这一行被注释掉时,url会正确地获取数据。请参阅下面的代码:-

<section class="card">
        <h2>Country</h2>
        <amp-list src="https://ampbyexample.com/json/cart.json" layout="fixed-height" height="80" >
            <template type="amp-mustache">
                <label for="country">Countries</label>
                <select id="country"
                        on="
      change:
        AMP.setState({
          countries: dropdown.items[0].countries.filter(x => x.profileTitle == event.value)[0]
        })">
                    <option value="">Choose a country</option>
                    {{#countries}}
                    <option value="{{name}}">{{name}}</option>
                    {{/countries}}
                </select>
            </template>
        </amp-list>
    </section>

国家
国家
选择一个国家
{{{国家}
{{name}}
{{/国家}

我是否应该在amp列表中添加一些内容,告诉它等待数据被获取,或者{{{countries}}模式在twig中不可用?非常感谢您的帮助。提前感谢。

您需要调整
细枝lexer
以便能够使用
amp
-bundleas@DarkBee声明,您正在混合两个模板分隔符。感谢@DarkBee和@Christian Felix的回复。我可以同时使用两个模板分隔符吗?我在我的控制器中创建了这个函数,但它仍然没有保存问题
private function setTwigConfiguration(){$path=dirname({uuuu DIR_uuuu,5)。/vendor/autoload.php';require_once$path;$twig=new\twig_Environment();$lexer=new\twig\lexer($twig,array('tag_variable'=>array({{{},}'));$twig setLexer->setLexer($code>