laravel-haml icon indicating copy to clipboard operation
laravel-haml copied to clipboard

Using Blade directives in html attributes

Open odiszapc opened this issue 4 years ago • 0 comments

Could you please help me with using Blade @error directive inside html attributes. This works:

<input class="@error('name') is-danger @enderror"/>

But in HAML notation it doesn't:

%input{:class` => '@error("name") is-danger @enderror'}

The rendered HTML looks like:

<input class="@error('name') is-danger @enderror"/>

What I'm doing wrong? Thanks!

odiszapc avatar Jul 22 '20 01:07 odiszapc