- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2019 07:53 PM
The announcement widget's client script uses the spAnnouncement API.
The widget editor can not refer to methods by Ctrl + Space. I want to know what methods are provided for study.
Are there anydocuments or information?
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2019 09:10 PM
Based on my information, its a client directive; You should be able to see the code at
https://hi.service-now.com/scripts/app.$sp/directive.spAnnouncements.js
I have a copy saved off here;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2019 09:08 PM
Hi,
There is no official documentation available. Below are the available methods in the spAnnouncements API
dismiss(id)
filterOnType(type)
get(query,limit,page)
init(announcements)
subscribe(scope, callback)
Regards,
Vimal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2019 09:11 PM
Where did you see these functions?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2019 09:10 PM
Based on my information, its a client directive; You should be able to see the code at
https://hi.service-now.com/scripts/app.$sp/directive.spAnnouncements.js
I have a copy saved off here;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2020 04:52 PM
Hi,
That gitbub link is broken.
spAnnouncement is injected into the client script which I belive must be some kind of AngularJS service or so?
I cannot find the code for this service, it is also not listed in the Angular Providers or Dependencies of this Widget. What is spAnnouncement?
See the client script:
function($scope, $timeout, $location, spAnnouncement, spUtil, spAriaUtil) {
...
}
TIA