User Criteria in Widgets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 11:47 AM
I need below html to be visible based on the user criteria. The sample code I have written is below
<div ng-if="data.userMatche='true'";> <h>text</h></div>
Server script is-
var userCriteria = ['6b6df061ff2121009b20ffffffffff44','0b5b0e6453631300afffddeeff7b1201'];
var userMatche = sn_uc.UserCriteriaLoader.userMatche(gs.getUserID(), userCriteria);
But I was not able to see the html content.
Can anyone please help me with this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 11:57 AM
@charan_1 I see a missing character in userMatches method update your code as follows.
var userCriteria = ['6b6df061ff2121009b20ffffffffff44','0b5b0e6453631300afffddeeff7b1201'];
var userMatches = sn_uc.UserCriteriaLoader.userMatches(gs.getUserID(), userCriteria);
gs.info(userMatches);
The code you pasted misses character 's' in userMatches method, in your code you wrote sn_uc.UserCriteriaLoader.userMatche(gs.getUserID(), userCriteria) whereas it should be sn_uc.UserCriteriaLoader.userMatches(gs.getUserID(), userCriteria)
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 01:10 PM
@Sandeep Rajput , Thanks for the response.
We have tried in that way also, still it is not working.
Can you please check and tell me where it was going wrong?