Is it possible to apply a directive to all input
tags programmatically? There are two primary reasons why this is desirable:
- Avoiding the need to individually add the directive to each input in the application
- Simplifying the process of making changes to the directive for all inputs at a later time by having it centrally located
I have looked through the documentation, but it appears that applying the directive directly to the element is the only method mentioned. Is there any other way to achieve this?
Here is the current code I am working with:
<input type="text" class="form-control input-sm" id="price" v-model="model.doc.price" v-floating-label>