Warning on Tag Helper

5 posts, 1 answers
  1. Reafidy
    Reafidy avatar
    26 posts
    Member since:
    Sep 2014

    Posted 07 Jul 2017 Link to this post

     

    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?

     

  2. Georgi
    Admin
    Georgi avatar
    698 posts

    Posted 12 Jul 2017 Link to this post

    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.
  3. Reafidy
    Reafidy avatar
    26 posts
    Member since:
    Sep 2014

    Posted 19 Jul 2017 in reply to Georgi Link to this post

    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.

  4. Answer
    Georgi
    Admin
    Georgi avatar
    698 posts

    Posted 24 Jul 2017 Link to this post

    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.
  5. Reafidy
    Reafidy avatar
    26 posts
    Member since:
    Sep 2014

    Posted 24 Jul 2017 in reply to Georgi Link to this post

    Excellent thanks.
Back to Top