Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72388

Hide elements of an Angular directive for certain situations

$
0
0

Being a directive called my-directive. The template of the directive contains 2 elements:

<div>
    <!-- element1 -->
</div>
<div>
    <!-- element2 -->
</div>

Adding it into another html file is done by:

<app-my-directive></app-my-directive>

My question is, is there a way to make this directive show only element1 if it is added into a certain html but show all its element otherwise?


Viewing all articles
Browse latest Browse all 72388

Trending Articles