Escape backslash in a Kendo Template for a v-model Vue directives

0 Answers 32 Views
General Discussions Grid RadioButton
journeyman
Top achievements
Rank 1
journeyman asked on 20 Feb 2025, 05:13 AM | edited on 24 Feb 2025, 06:23 PM

How do you backslash escape Vue directives in a Kendo UI Template.

I want to escape a v-model on my Kendo UI template.

This is how I tired to escape them but it did not work.

<input type="checkbox"  \# v-model="checked" \# > 
EDIT:

I tried using a double escaped \# like this:

 <input type="checkbox"  \\# v-model="checked" \# >

But it did not work, when I examined the page via chrome dev tool, this is how the input  is displayed:

 

<input type="checkbox" #="" v-model="checked">

The reason for the v-model is that I am trying to do an 'if conditional' in my Vue.js model

. i.e

<script>
    const mixin = {

        data: function() {
            return {
               checked:true
       }

  created() {
    this.checked = this.addGoals();
   },
  methods: {
    addGoals() {
	if (test === 3){
        return true;
        }else{
	return false;
     }
  }

</script>

 

I did try this method to escape the values but it did not work:

<input type="checkbox" #:v-model="checked">

The error message: 

Uncaught Error: Invalid template:'

Filip
Telerik team
commented on 24 Feb 2025, 04:04 PM

Hello,

Can you provide more details about the scenario you’re facing and the reason for escaping Vue directives in the template? This will allow me to suggest the most suitable approach tailored to your scenario.

Regards,
Filip
journeyman
Top achievements
Rank 1
commented on 24 Feb 2025, 06:23 PM

Hello Filip.  

Thank you for your reply . I  have updated my question.  The reason for the v-model is that I am trying to do an 'if conditional' in my Vue.js model. i.e i want to check the input if certain conditions are met,.

 

Vessy
Telerik team
commented on 27 Feb 2025, 01:19 PM

Hello, 

My colleague has just answered your other thread on the same matter and in order to avoid duplicate discussions, we would like to kindly ask you to continue the conversation only at one place. You can access his reply here:

journeyman
Top achievements
Rank 1
commented on 28 Feb 2025, 03:13 PM

Thanks Vessy

i have indeed been trying to work out a solution to the problem with your colleague thank you.

 

Vessy
Telerik team
commented on 04 Mar 2025, 06:44 AM

Thank you too for the update!

No answers yet. Maybe you can help?

Tags
General Discussions Grid RadioButton
Asked by
journeyman
Top achievements
Rank 1
Share this question
or