{"id":16630721,"url":"https://github.com/stephencooper/strictangularcomponents","last_synced_at":"2025-07-21T11:32:23.989Z","repository":{"id":37744752,"uuid":"477840105","full_name":"StephenCooper/StrictAngularComponents","owner":"StephenCooper","description":"Code examples for writing Angular Components that are compliant with Typescript strict mode ","archived":false,"fork":false,"pushed_at":"2022-06-22T18:41:08.000Z","size":9715,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T18:53:13.768Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StephenCooper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-04T19:14:35.000Z","updated_at":"2023-08-01T11:19:48.000Z","dependencies_parsed_at":"2022-09-13T22:52:26.351Z","dependency_job_id":null,"html_url":"https://github.com/StephenCooper/StrictAngularComponents","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StephenCooper/StrictAngularComponents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephenCooper%2FStrictAngularComponents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephenCooper%2FStrictAngularComponents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephenCooper%2FStrictAngularComponents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephenCooper%2FStrictAngularComponents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StephenCooper","download_url":"https://codeload.github.com/StephenCooper/StrictAngularComponents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephenCooper%2FStrictAngularComponents/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266291730,"owners_count":23906322,"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":[],"created_at":"2024-10-12T04:48:42.670Z","updated_at":"2025-07-21T11:32:23.964Z","avatar_url":"https://github.com/StephenCooper.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StrictAngularComponents\nCode examples for writing Angular Components that are compliant with Typescript strict mode. Two sample apps for the approaches described under [Template Type Checking](https://angular.io/guide/template-typecheck#troubleshooting-template-errors).\n\nIn both demos you will see compilation errors when running `npm run start` as I have left examples that need fixing following the approaches outlined below.\n\n## Setter Getter Demo\n\nShows how to use Setters and Getters to perform input coercion now that Typescript 4.3 allows its setters and getters to have different types.\n\n```ts\n  @Input()\n  get disabled(): boolean {\n    return this._disabled;\n  }\n  set disabled(value: boolean | string) {\n    this._disabled = (value === '') || value === true;\n  }\n```\n\n## ngAcceptInputType Demo\n\nBefore Angular 13 and Typescript 4.3 we had to use the static flag `ngAcceptInputType_` to enable input coercion. \n\n```ts\n  @Input()\n  public disabled: boolean = false;\n  static ngAcceptInputType_disabled: boolean | '';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephencooper%2Fstrictangularcomponents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephencooper%2Fstrictangularcomponents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephencooper%2Fstrictangularcomponents/lists"}