BKWLD / laravel-haml

Wraps MtHaml for ease use in Laravel
MIT License
45 stars 10 forks source link

Using Blade directives in html attributes #28

Open odiszapc opened 4 years ago

odiszapc commented 4 years ago

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!