How can i set zindex in typescript for angular 5
You can use NgStyle directive for set zindex
[ngStyle]="{'z-index':condition ? 9 : 0 }"
You might be better using inline style binding rather than using querySelector
- depending on the situation
<p [style.z-index]="1">
Some text
</p>