Angular table row directive not rendering inside table

后端 未结 3 1840
有刺的猬
有刺的猬 2020-12-10 10:34

I am trying to add a row \"isrcrow\" directive to a table as follows:


        ...
        

Which will be a direct child of a

, which is invalid markup. As a result, most modern browsers (e.g. Chrome, and also Firefox, I believe) will try to "fix" your markup to be valid by moving the tag outside of the table.

Instead, if you add replace: true to your directive specification, the element won't be rendered, and the browser should see only valid markup and not try to "fix" it.

提交回复
热议问题
3条回答
  •  温柔的废话
    2020-12-10 11:21

    I would guess that this is because you have not specified replace: true for the isrcrow directive. As a result, the final markup would look like:

    
        
......