I am using the Clarity Signposts and need its state (whether its open or closed). I am using the *clrIfOpen
structural directive and have assigned it the isOpen variable. isOpen
is false initially but should update to true when the Signpost is open.
<clr-signpost>
<clr-signpost-content *clrIfOpen="isOpen">
<p>Signpost Content!</p>
<span>Signpost State: {{isOpen}}</span>
</clr-signpost-content>
</clr-signpost>
I also tried the clrIfOpenChange
output on clrIfOpen
but it too is not triggered when the signpost is opened.
Clarity Version: 0.10.0-rc.1
Plnkr: https://plnkr.co/edit/OQupObBd9OkJZSpOhpfq?p=preview
I believe what you want to use is the de-sugared syntax of Angular structural directives to access the Output Emitter.
<clr-signpost>
<ng-template [(clrIfOpen)]="isOpen">
<clr-signpost-content>
<p>Signpost Content!</p>
<span>Signpost State: {{isOpen}}</span>
</clr-signpost-content>
</ng-template>
</clr-signpost>
Please refer to this Plnkr: https://plnkr.co/edit/SZNDZIiyomGWJsC7UsiC?p=preview
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With