{"id":46109562,"url":"https://github.com/joeskeen/ng-noop","last_synced_at":"2026-04-09T01:30:43.015Z","repository":{"id":344202397,"uuid":"1157954218","full_name":"joeskeen/ng-noop","owner":"joeskeen","description":"An minimal custom Angular non-browser platform (that does nothing)","archived":false,"fork":false,"pushed_at":"2026-02-14T15:12:03.000Z","size":80,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-14T03:21:14.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/joeskeen.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-14T15:11:07.000Z","updated_at":"2026-02-18T00:12:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/joeskeen/ng-noop","commit_stats":null,"previous_names":["joeskeen/ng-noop"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/joeskeen/ng-noop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeskeen%2Fng-noop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeskeen%2Fng-noop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeskeen%2Fng-noop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeskeen%2Fng-noop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeskeen","download_url":"https://codeload.github.com/joeskeen/ng-noop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeskeen%2Fng-noop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-03-01T22:00:55.619Z","updated_at":"2026-04-09T01:30:43.007Z","avatar_url":"https://github.com/joeskeen.png","language":"TypeScript","funding_links":[],"categories":["Development Utilities"],"sub_categories":["Runtime"],"readme":"# **Angular Noop Platform**\n\n*A minimal, DOM‑less Angular platform for custom runtimes, CLIs, servers, and experimental renderers.*\n\n## **What is this?**\n\n`@angular/platform-noop` is a custom Angular platform implementation that provides:\n\n- Angular’s **dependency injection**\n- Angular’s **change detection**\n- Angular’s **component instantiation**\n- Angular’s **environment injector**\n- Angular’s **application bootstrap pipeline**\n\n…but **without any browser or DOM APIs**.\n\nIt is essentially Angular’s brain — without its body.\n\nThis platform is ideal for environments where:\n\n- there is **no DOM**\n- there is **no browser**\n- you want to **render Angular components into something else**  \n  (terminal, canvas, PDF, custom UI toolkit, etc.)\n- you want to **experiment with Angular’s internals**\n- you want to **build a custom renderer**\n- you want to **run Angular in Node** without JSDOM\n- you want a **minimal test harness** for Angular logic\n\nIf you’ve ever wished Angular had a “headless mode,” this is it.\n\n\u003e **Note:** This package is not intended to be used directly as a\n\u003e production-ready runtime. Instead, it serves as a *reference\n\u003e implementation* and a *starting point* for building your own custom\n\u003e Angular platform—one that is fully detached from the DOM and tailored\n\u003e to your target environment. The noop platform demonstrates the minimal\n\u003e set of invariants Angular requires in order to run outside the browser.\n\n---\n\n## **Why does this exist?**\n\nAngular’s official platforms — Browser, Server, WebWorker — all assume some form of DOM or DOM‑like environment. Even Angular Universal (server‑side rendering) still relies on a DOM abstraction.\n\nBut there are valid use cases where:\n\n- you don’t want a DOM  \n- you don’t want to simulate a DOM  \n- you don’t want Angular to *think* a DOM exists  \n- you want Angular to run purely as a component model + DI container  \n\nUnfortunately, Angular’s bootstrap pipeline assumes:\n\n- components have selectors  \n- selectors correspond to DOM elements  \n- the platform provides browser services  \n- the renderer manipulates DOM nodes  \n- the environment injector is tied to the browser platform  \n\nThis project exists to break those assumptions cleanly and intentionally.\n\n---\n\n## **What makes a noop platform different?**\n\nA noop platform has a few key invariants:\n\n### **1. No DOM access of any kind**\n\nThis platform does **not** provide:\n\n- `Document`\n- `PlatformLocation`\n- `LocationStrategy`\n- `ViewportScroller`\n- `Sanitizer`\n- `XhrFactory`\n\nThrough iterative elimination, it turns out Angular does **not** require any of these to bootstrap in a DOM‑less environment.\n\n### **2. The root component must not have a selector**\n\nAngular’s compiler automatically generates a default selector (`ng-component`) if you don’t provide one.\n\nIn a DOM‑less environment, this is fatal.\n\nAngular will try to *locate* a host element instead of *creating* one, which leads to assertion failures.\n\nThis platform patches the Ivy metadata of the root component:\n\n```ts\ncmp.ɵcmp.selectors = [[]];\n```\n\nThis tells Angular:\n\n\u003e “This component has no selector. Do not query the DOM. Create a host element instead.”\n\nChild components do **not** need patching — Angular instantiates them internally.\n\n### **3. A minimal provider set**\n\nThrough systematic elimination, the smallest provider set Angular requires is:\n\n- `ɵINJECTOR_SCOPE` — needed for application ID generation  \n- `ErrorHandler` — Angular always injects one  \n- `RendererFactory2` — Angular requires a renderer, even if it does nothing  \n- `IMAGE_CONFIG` — required by Angular’s image directive  \n\nEverything else is optional.\n\n### **4. The platform bootstrap pipeline must run without browser services**\n\nThis platform uses Angular’s internal `ɵinternalCreateApplication` to bootstrap the app without invoking browser‑specific logic.\n\n---\n\n## **How it works**\n\n### **Creating the platform**\n\n```ts\nexport function platformNoop(): PlatformRef {\n  return createPlatformFactory(platformCore, PLATFORM_NOOP_ID, [])();\n}\n```\n\nThis mirrors `platformBrowser()` and `platformServer()`, but installs **no** platform‑level providers.\n\n### **Bootstrapping an application**\n\n```ts\nexport async function bootstrapApplication(component, config) {\n  stripSelectors(component);\n  return ɵinternalCreateApplication({\n    rootComponent: component,\n    appProviders: [...],\n    platformProviders: [],\n    platformRef: platformNoop(),\n  });\n}\n```\n\nThis is equivalent to Angular’s `bootstrapApplication()`, but adapted for a DOM‑less environment.\n\n---\n\n## **Who is this for?**\n\nThis project is useful for:\n\n### **Platform architects**\n\nBuilding a custom Angular runtime or experimenting with Angular’s internals.\n\n### **Renderer authors**\n\nRendering Angular components into:\n\n- terminal UIs  \n- canvas  \n- WebGL  \n- native UI toolkits  \n- PDFs  \n- game engines  \n- anything that isn’t the DOM  \n\n### **Framework researchers**\n\nStudying Angular’s DI, change detection, and bootstrap pipeline without browser noise.\n\n### **Tooling authors**\n\nBuilding:\n\n- Angular‑powered CLIs  \n- static analyzers  \n- code generators  \n- test harnesses  \n- SSR‑like pipelines without DOM emulation  \n\n### **Engineers who want to understand Angular deeply**\n\nThis platform exposes Angular’s core architecture in its purest form.\n\n---\n\n## **Why not just use JSDOM or Domino?**\n\nBecause:\n\n- they simulate a DOM you don’t need  \n- they hide the real architectural boundaries  \n- they introduce performance overhead  \n- they mask bugs  \n- they force Angular to take browser‑specific code paths  \n- they don’t help you build a custom renderer  \n\nA noop platform is cleaner, faster, and more honest.\n\n---\n\n## **What this project is _not_**\n\n- It is **not** a replacement for Angular Universal  \n- It is **not** a browser platform  \n- It is **not** a DOM emulator  \n- It is **not** a full rendering engine  \n- It is **not** intended for production web apps  \n\nThis is a foundation for **custom platforms**, not a general‑purpose runtime.\n\n---\n\n## **Future directions**\n\nThis platform is intentionally minimal, but it opens the door to:\n\n- a terminal renderer  \n- a canvas renderer  \n- a native desktop renderer  \n- a WebGPU/WebGL renderer  \n- a static HTML generator  \n- a test‑only Angular runtime  \n- a teaching tool for Angular internals  \n\nIf you build something on top of this, please share it — the Angular ecosystem needs more experimentation at the platform level.\n\n---\n\n## **Why this matters**\n\nAngular’s architecture is powerful, but most developers only ever see it through the lens of the browser. This project demonstrates that Angular is not inherently tied to the DOM — it’s a component model, a DI system, and a change detection engine that can run anywhere.\n\nBy providing a clean, minimal, DOM‑less platform, this project gives engineers the freedom to explore what Angular can be outside the browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeskeen%2Fng-noop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeskeen%2Fng-noop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeskeen%2Fng-noop/lists"}