How to add external library to SP Widget?

adevezin
Giga Contributor

Hello, im trying to create a custom widget just like can be seen here Create a widget.

What im trying to add is material angular. When just including:

<script src="https://cdn.gitcdn.link/cdn/angular/bower-material/v1.0.0/angular-material.js"></script>

<link href="https://cdn.gitcdn.link/cdn/angular/bower-material/v1.0.0/angular-material.css" rel="stylesheet" type="text/css"></link>

<link href="https://material.angularjs.org/1.1.3/docs.css" rel="stylesheet" type="text/css"></link>

in the html. It does not work. How can i add the material angular styles into the widget?

7 REPLIES 7

amitra2
Kilo Contributor

Hi Adrian,


Many thanks for your help. I have some other question. I want to know more about sputil and $sp in more details.can you please provide me any clue?



Regards,


Amitra


adevezin
Giga Contributor

I'm sorry   don't know the technical details of those.


jesseadams
ServiceNow Employee
ServiceNow Employee

Hi Amitra,


There are some documented methods available in the unofficial service portal docs on GitHub but if you're looking for something outside of what is documented there then it's most likely private API that isn't intended for customer use.



documentation/widget_client_script_apis.md at master · service-portal/documentation · GitHub


documentation/widget_server_script_apis.md at master · service-portal/documentation · GitHub



Check out those links and see if they answer your questions.