I am not familiar with slim-lang , but this is what you need to get inside the Vue template:
<div v-bind:class="['static-class', { 'active-class' : isActive }]">...</div>
In the above case, if isActive evaluates to true , then the "active class" will be applied. And the "static-class" is always applied in the view. This is called array syntax.
Link: https://vuejs.org/guide/class-and-style.html#Array-Syntax
You need to make sure the slim-lang processor emits the above html.
Now, having come to the id setting, you cannot use attribute bindings using mustache syntax ( {{...}} ). You need to bind your id as follows:
<div v-bind:id="dynamicId"></div>
Link: https://vuejs.org/guide/syntax.html#Attributes
source share