5 lines
18 KiB
JSON
5 lines
18 KiB
JSON
|
{
|
||
|
"id": "api/service-worker/SwPush",
|
||
|
"title": "SwPush",
|
||
|
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/service-worker\", \"name\": \"@angular/service-worker\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/service-worker/SwPush\", \"name\": \"SwPush\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/service-worker\">@angular/service-worker</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/service-worker/src/push.ts?message=docs(service-worker)%3A%20describe%20your%20change...#L14-L213\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/service-worker/src/push.ts#L14-L213\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header class=\"api-header\">\n <h1 id=\"swpush\">SwPush<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/service-worker/SwPush#swpush\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label class\">class</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section class=\"short-description\">\n <p>Subscribe and listen to\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices\">Web Push\nNotifications</a> through\nAngular Service Worker.</p>\n\n \n </section>\n \n \n \n <section class=\"class-overview\">\n<code-example language=\"ts\" hidecopy=\"true\">\nclass <a href=\"api/service-worker/SwPush\" class=\"code-anchor\">SwPush</a> {\n <a class=\"code-anchor\" href=\"api/service-worker/SwPush#messages\"><span class=\"member-name\">messages</span>: Observable<object></a>\n <a class=\"code-anchor\" href=\"api/service-worker/SwPush#notificationClicks\"><span class=\"member-name\">notificationClicks</span>: Observable<{...}</a>\n <a class=\"code-anchor\" href=\"api/service-worker/SwPush#subscription\"><span class=\"member-name\">subscription</span>: Observable<PushSubscription | null></a>\n <a class=\"code-anchor\" href=\"api/service-worker/SwPush#isEnabled\"><span class=\"member-name\">isEnabled</span>: boolean</a>\n <a class=\"code-anchor\" href=\"api/service-worker/SwPush#requestSubscription\"><span class=\"member-name\">requestSubscription</span>(options: { serverPublicKey: string; }): Promise<PushSubscription></a>\n <a class=\"code-anchor\" href=\"api/service-worker/SwPush#unsubscribe\"><span class=\"member-name\">unsubscribe</span>(): Promise<void></a>\n}\n</code-example>\n\n \n \n\n</section>\n\n\n \n<section class=\"see-also\">\n <h2 id=\"see-also\">See also<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/service-worker/SwPush#see-also\"><i class=\"material-icons\">link</i></a></h2>\n <ul>\n \n <li><p><a href=\"https://developers.google.com/web/fundamentals/codelabs/push-notifications/\">Push Notifications</a></p>\n</li>\n <li><p><a href=\"https://blog.angular-university.io/angular-push-notifications/\">Angular Push Notifications</a></p>\n</li>\n <li><p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Push_API\">MDN: Push API</a></p>\n</li>\n <li><p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API\">MDN: Notifications API</a></p>\n</li>\n <li><p><a href=\"https:/
|
||
|
}
|