是否可以path动态使用该功能?用变量作为参数?
{{ path(nav.url, { nav.param_name : nav.param_value }) }}
因为如果我尝试使用我得到的代码:
A hash key must be followed by a colon (:).
Unexpected token "punctuation" of value "."
("punctuation" expected with value ":")
Run Code Online (Sandbox Code Playgroud)
我知道通过'硬编码' param_name将会工作...像这样:
{{ path('nav.url', { 'id' : nav.param_value }) }}
但是我需要动态传递3值