This is a migrated thread and some comments may be shown as answers.

Warning on Tag Helper

4 Answers 173 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Reafidy
Top achievements
Rank 1
Reafidy asked on 08 Jul 2017, 12:03 AM

 

I am using the following simple TagHelper:

   <kendo-datepicker name="DatePicker"
                                  for="Date"
                                  style='width: 280px;'>
    </kendo-datepicker> 

It works correctly but compiles with the following warning:

Warning Element 'kendo-datepicker' does not allow content and cannot have separate end tag.

I cannot get rid of the warning, what does it mean and how do I get rid of it?

 

4 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 12 Jul 2017, 12:24 PM
Hi Reafidy,

I tried to recreate the behavior you are observing, but I am not getting any warnings on my end:


Could you please send us an isolated sample where the issue occurs, so we can investigate locally your exact case and help you more efficiently.


Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Reafidy
Top achievements
Rank 1
answered on 19 Jul 2017, 07:50 AM

Hi Georgi,

Thanks for helping out.  You are not observing the error because you have not yet enable razor intellisense.  I can see this in your video as your tag helper is not purple.  You can do this by going to Tools / "Extensions and Updates". Click on Online in the left column, and use the search box to locate "Razor Language Services." Install the extension and restart VS 2017.  

After that your taghelper should be purple and you should see the error when you re add the taghelper.  Please note:  Sometimes the error does not show until you retype taghelper.

Me providing you with a sample project will not help unless you have the intellisense working and if you do this the error should show up in your project, I created a new project just like yours and the error showed up.

See attached.

0
Accepted
Georgi
Telerik team
answered on 24 Jul 2017, 06:36 AM
Hi Reafidy,

The extension is a third party tool and we are not able to control its behavior. Nevertheless, you can avoid this warning by declaring the tag helper as self-closing tag, e.g.:


<kendo-datepicker name="DatePicker"            
                  style='width: 280px;'/>


Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Reafidy
Top achievements
Rank 1
answered on 25 Jul 2017, 04:32 AM
Excellent thanks.
Tags
General Discussions
Asked by
Reafidy
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Reafidy
Top achievements
Rank 1
Share this question
or