{"id":17468625,"url":"https://github.com/kamilkisiela/angular-async-ssr","last_synced_at":"2025-11-03T04:30:36.326Z","repository":{"id":66075639,"uuid":"88626428","full_name":"kamilkisiela/angular-async-ssr","owner":"kamilkisiela","description":"How to make an async operation to be SSR friendly (angular universal)","archived":false,"fork":false,"pushed_at":"2017-04-19T09:04:13.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T03:12:32.628Z","etag":null,"topics":["angular","angular-ssr","angular-universal","ssr"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamilkisiela.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-18T13:09:57.000Z","updated_at":"2017-04-19T08:44:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7eade04-5144-48a0-8aab-f90a4512ea12","html_url":"https://github.com/kamilkisiela/angular-async-ssr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fangular-async-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fangular-async-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fangular-async-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fangular-async-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamilkisiela","download_url":"https://codeload.github.com/kamilkisiela/angular-async-ssr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406496,"owners_count":19633025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-ssr","angular-universal","ssr"],"created_at":"2024-10-18T15:13:58.987Z","updated_at":"2025-11-03T04:30:36.287Z","avatar_url":"https://github.com/kamilkisiela.png","language":"TypeScript","readme":"# angular-async-ssr\nHow to make an async operation to be SSR friendly (angular universal)\n\n## Background\n\nAn Application bootstraps when it turns to be stable (`ApplicationRef.isStable`). \nIt happens on few cases. One of them is when there's no pending MacroTasks (`NgZone.hasPendingMacrotasks`).\n\nLet's say you do a basic async request, for example using **Fetch API**.\nIt's being scheduled as a MicroTask which means Angular treats it as something not important to wait for.\n\n## Schedule MacroTask\n\nA solution could be to schedule a MacroTask. Take a look at [an example implementation](./src/app/api.service.ts).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilkisiela%2Fangular-async-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamilkisiela%2Fangular-async-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilkisiela%2Fangular-async-ssr/lists"}