Hide an element in a DIV

mkader
Kilo Guru

Hello,

I am new to ServiceNow and Angular.

How can I hide a <div> on a widget through the portal?

I am able to not populate info to the <div>, but it just adds a big blank space.

what I have is:

<div ng-if="!c.data.accounting" ng-bind-html="c.data.marketing"></div>

I want to also perform a hide on this <div>

THanks!

 

 

6 REPLIES 6

vkachineni
Kilo Sage

try

ng-if="c.data.accounting == false"

 

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022

@vkachineni - I just tried that and now none of the values display.

Add the following to HTML of your widget at the end, to see what is the value in c.data.accounting

<pre>
{{ data | json }}
</pre>

 

 

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022

{{ data | json }}

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022