hussain hussain - 4 months ago 11
Javascript Question

list items display without bullets use text instead?

I removed the bullet points from an unordered list, and I want to display

Log
with every message but that is not coming up. Any idea what is wrong in the below code, because I want user to see the difference between messages, all messages together user can not see message start and end points. Any other solution to make it better?

main.html

<div class="row">
<ul style="list-style: none">
<li ng-repeat="item in data | filter:vm.searchLog track by $index" ng-bind-html="item | highlight:vm.searchLog">Log:</li>
</ul>
</div>

Answer

Use the CSS :before selector with a content property to insert some text instead of a bullet point

ul {
    list-style: none;
}

li:before {
    content: 'Log';
    padding-right: 5px;
}

See here for a Fiddle