how to send a twig template into a javascript string

       point.content = '{{ include(
        "KreactiveOrientationBundle:Institute:_address_popup.html.twig",
        { "institute": institute }
        ) | json_encode |raw }} ';
just use filter: json_encode and then : raw

评论

热门博文