{"id":28098759,"url":"https://github.com/leolanese/angular-component-communication","last_synced_at":"2026-04-28T18:07:41.346Z","repository":{"id":287705598,"uuid":"921732740","full_name":"leolanese/Angular-Component-Communication","owner":"leolanese","description":"Angular (19+) Observables and Signal using @Input/@Output playground and Signal Input/Output","archived":false,"fork":false,"pushed_at":"2025-04-15T12:09:49.000Z","size":273,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T21:20:27.682Z","etag":null,"topics":["angular","httpresource","observable","rxjs","signal","typescript"],"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/leolanese.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}},"created_at":"2025-01-24T14:09:25.000Z","updated_at":"2025-04-15T12:09:52.000Z","dependencies_parsed_at":"2025-04-13T13:33:24.587Z","dependency_job_id":null,"html_url":"https://github.com/leolanese/Angular-Component-Communication","commit_stats":null,"previous_names":["leolanese/angular-component-communication"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Component-Communication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Component-Communication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Component-Communication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Component-Communication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leolanese","download_url":"https://codeload.github.com/leolanese/Angular-Component-Communication/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253999882,"owners_count":21997349,"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","httpresource","observable","rxjs","signal","typescript"],"created_at":"2025-05-13T17:58:47.032Z","updated_at":"2026-04-28T18:07:41.342Z","avatar_url":"https://github.com/leolanese.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular (19+) Observables Vs Signal using @Input/@Output playground and Signal Input/Output 🔊\r\n\r\n## Demo\r\n\r\n![Demo](./src/app/assets/demo-updated.png)\r\n\r\n---\r\n\r\n## Modern practices latest final signal-based API is implementing 🚀\r\n\r\n```js\r\n✅ @NgModule  → Standalone component\r\n✅ *ngFor, *ngIf  → Modern control flow: @if, @for\r\n✅ Parent emits updates through writableSignal() following the Modern `Signal-Based Component Architecture Pattern` (Service (Shared State) ←→ Parent (Local State) ←→ Child (Pure Input))\r\n✅ ngOnInit() + subscribe() + contructor based inject → Use reactive Signals + computed() \r\n✅ contruct-based DI injection → inject(HttpClient) \r\n✅ Better Ts notation → Protected + readonly template properties for protection and mutability control\r\n✅ Two-Way Binding (Old Way) → signal-input-pattern \r\n```\r\n\r\n---\r\n\r\n## NOTES:\r\n\u003e When passing values from a P -\u003e C component using the `@Input`, `these values are not available in the constructor` = Avoids running Angular-specific logic or accessing @Input properties, as they are not yet set.\r\n\r\n\u003e If you need to react to changes in @Input values beyond initialization, consider using the `ngOnChanges()` lifecycle hook\r\n\r\n### constructor()\r\n- Called first, before any Angular lifecycle hooks.\r\n- Used to initialise the component instance.\r\n- Runs before Angular has fully initialized the component.\r\n- `Not safe access @Input values`\r\n\r\n### ngOnInit()\r\n- called after the constructor, after the first ngOnChanges()\r\n- `Safe for access @Input` values\r\n- Runs after the constructor and after Angular sets up the component's bindings.\r\n\r\n---\r\n\r\n### :100: \u003ci\u003eThanks!\u003c/i\u003e\r\n#### Now, don't be an stranger. Let's stay in touch!\r\n\r\n\u003ca href=\"https://github.com/leolanese\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\r\n  \u003cimg src=\"https://scastiel.dev/api/image/leolanese?dark\u0026removeLink\" alt=\"leolanese’s GitHub image\" width=\"600\" height=\"314\" /\u003e\r\n\u003c/a\u003e\r\n\r\n##### :radio_button: Linkedin: \u003ca href=\"https://www.linkedin.com/in/leolanese/\" target=\"_blank\"\u003eLeoLanese\u003c/a\u003e\r\n##### :radio_button: Twitter: \u003ca href=\"https://twitter.com/LeoLanese\" target=\"_blank\"\u003e@LeoLanese\u003c/a\u003e\r\n##### :radio_button: DEV.to: \u003ca href=\"https://www.dev.to/leolanese\" target=\"_blank\"\u003eBlog\u003c/a\u003e\r\n##### :radio_button: Questions / Suggestion / Recommendation: developer@leolanese.com\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleolanese%2Fangular-component-communication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleolanese%2Fangular-component-communication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleolanese%2Fangular-component-communication/lists"}