1.

How Can You Inject Services Into A Volt Template?

Answer»

If a SERVICE container (DI) is available for Volt, you can use the services by only ACCESSING the name of the service in the template:

{# Inject the 'flash' service #}
<DIV id="messages">{{ flash.output() }}</div>
{# Inject the 'security' service #}

If a service container (DI) is available for Volt, you can use the services by only accessing the name of the service in the template:

{# Inject the 'flash' service #}
<div id="messages">{{ flash.output() }}</div>
{# Inject the 'security' service #}



Discussion

No Comment Found