Uncaught exception in promise when when trying to use nested components

前端 未结 7 1831
醉话见心
醉话见心 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:12

    I did have a similar issue with a different cause :

    I built a small app using angular-cli and when the html of the component is created, it has something like :

    Component works !

    So what I did is that to test a little bit my component :

    Component works !

    {{value}}

    But then the error showed up.

    It's just because a paragraph can't contain a block element like ( div , h1, ul etc).

    So many time wasted just to spot that ...

    When I do

     
    Component works !
    {{value}}

    It's working fine ;)

提交回复
热议问题