javascript - How to make angular display an empty <p> tag? -


i'm using ng-repeat , trying create paragraph element has specific border on hovering, when element empty. however, when paragraph element empty, there's no hover functionality. , "inspect element" tool not showing presence of paragraph tag @ all.

is there workaround?

thank you.

js:

var members =  [  {name: "john", dod: "december 8, 1980"},  {name: "paul", dod: ""},  {name: "george", dod: "november 29, 2001"},  {name: "ringo", dod: ""} ]; 

html:

<table>   <tr ng-repeat='member in members'>     <p class='hoveroutline' ng-repeat="member in members">       {{member.dod}}     </p>   </tr> </table> 

css:

.hoveroutline:hover{     border: 2px solid black; } 

you put p element inside tr. invalid markup, , browser sure refuse render expect. use td (or th) direct child of tr.

you should rethink layout: maybe don't need table, , can go div's.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -