Class in Angular ng-template atached to a widget is not loading on the portal

Rose17
Tera Contributor

Hi All,

 

I have a Angular ng- template attached to a widget. I have written a class in the ng- template. But that class is not getting loaded on the portal which is why one of the functionality is breaking. 

This issue is seen on the environments upgraded to Utah.

Could someone help me to resolve it or provide some suggestions on the same?

 

Thanks in advance.

3 REPLIES 3

priyasunku
Kilo Sage

@Rose17 

Please check the below link may this might help you.

 

https://www.servicenow.com/community/now-platform-forum/widget-ng-include-not-pulling-in-template/m-...

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful

JJ14
Tera Contributor

I was facing the same issue. It appears that self-closing HTML tags are the issue and need an explicit closing tag.

The following was failing anything added after the tag (e.g., we have a custom widget with additional links below that weren't showing):

<sp-widget widget="data.typeAheadSearch" />

 

The following works now:

<sp-widget widget="data.typeAheadSearch"></sp-widget>

 

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Rose17 ,
I trust you are doing great.

I can suggest that the issue could be due to self-closing HTML tags which require explicit closing tags. To resolve this issue, you can try changing the self-closing tag to a regular tag with an explicit closing tag.

For example, change the following self-closing tag:

<sp-widget widget="data.typeAheadSearch" />

to a regular tag with an explicit closing tag:

<sp-widget widget="data.typeAheadSearch"></sp-widget>

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi