Hide an element in a DIV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2020 12:34 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2020 12:44 PM
try
ng-if="c.data.accounting == false"
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2020 01:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2020 01:52 PM
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>
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2020 06:13 AM
{{ data | json }}
Vinod Kumar Kachineni
Community Rising Star 2022