im working on a angular 6. im changing the colors of a div tag from a script after a click function i need to change it back to transparent
Here is my View when i click the inheritance first line gets background color gets changed
after clicking inheritance when i click the Method Overriding the second lines get highlighted But i need to remove the background color from first line
Html code for side bar
<div *ngFor="let classes of classesObject ">
<input id='{{classes}}' name='radio' type='radio'>
<label (click)="clickClass(classes)" for='{{classes}}'>
{{classes}}
<div class='lil_arrow'></div>
<div class='bar'></div>
<div class='swanky_wrapper__content'>
<ul *ngFor="let conceptName of concepts">
<li (click)="getConcepts(conceptName['conceptName'],[classes])">{{conceptName["conceptName"]}}</li>
</ul>
</div>
</label>
</div>
Html code for line display
<div *ngFor="let lines of lineList; let i= index">
<div id="line_{{i}}" class="code" > {{lines}}</div>
</div>
Typescript code for getConcept method
for (var no in this.relatedLineNo) {
var lines = this.relatedLineNo[no] - 1;
document.getElementById(`line_` + lines).style.backgroundColor = "black";
document.getElementById(`line_` + lines).style.color = "white";
document.getElementById(`line_` + lines).style.cursor = "pointer";
document.getElementById(`line_` + lines).setAttribute("tooltip", this.messageTip);
}

