Uncaught exception in promise when when trying to use nested components

前端 未结 7 1754
醉话见心
醉话见心 2021-01-03 20:56

I am getting this exception when trying to use nested components:

EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot set property \'endSourceSpan\' o         


        
相关标签:
7条回答
  • 2021-01-03 21:20

    <xxx /> is valid if xxx is a void element

    area, base, br, col, command, embed, hr, img, input, keygen, link, meta, param, source, track, wbr

    https://www.w3.org/TR/html-markup/syntax.html#syntax-elements

    No that's ok, I found the bug an unclosed div in html,

    Missing closing <div> it is.

    Probably

    <input class="form-control" [(ngModel)]="newMenuItem"/>
    

    /> is not valid HTML5. Angular is quite strict about the HTML you pass to Angular.

    <input>

    Tag omission Must have a start tag and must not have an end tag.

    Change it to

    <input class="form-control" [(ngModel)]="newMenuItem">
    

    0 讨论(0)
提交回复
热议问题