{"id":27935346,"url":"https://github.com/venzovisa/angular-calculator","last_synced_at":"2025-05-07T06:15:53.222Z","repository":{"id":287224374,"uuid":"963764315","full_name":"venzovisa/angular-calculator","owner":"venzovisa","description":"Showcase of using Components, Observables, Services, Unit testing","archived":false,"fork":false,"pushed_at":"2025-05-02T15:05:15.000Z","size":414,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T06:15:48.525Z","etag":null,"topics":["angular","jest","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/venzovisa.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-04-10T07:10:46.000Z","updated_at":"2025-05-02T15:05:19.000Z","dependencies_parsed_at":"2025-04-10T16:51:05.277Z","dependency_job_id":"3e2438ef-c1de-4fa5-ad32-0c6a6f538103","html_url":"https://github.com/venzovisa/angular-calculator","commit_stats":null,"previous_names":["venzovisa/angular-calculator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venzovisa%2Fangular-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venzovisa%2Fangular-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venzovisa%2Fangular-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venzovisa%2Fangular-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venzovisa","download_url":"https://codeload.github.com/venzovisa/angular-calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252824152,"owners_count":21809715,"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","jest","typescript"],"created_at":"2025-05-07T06:15:52.424Z","updated_at":"2025-05-07T06:15:53.216Z","avatar_url":"https://github.com/venzovisa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Calculator\n\nThis project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.7.\n\nThe main idea is to replicate the functionality of the default desktop calculator application used in popular operation systems such as Windows or MacOS but in the web browser. The calculator has a standard options like addition, multiplication, division, substraction, power and percent. Also there is a memory function which stores every result made after clicking on equal sign button. It is placed on another route to utilize Angular Router Service and the user should navigate to it via navigation menu. Memory function uses Angular Service feature to demonstrate working with dependency injection pattern and managing data between different components which are not directly connected to each other with BehaviorSubject. To pick any saved value there is a button on every item which will get the value and redirect back to the calculator route in order to use it in the calculation. For now saved value could be the first number of the expression only. For arithmetic operations JavaScript built-in Math object is used.\n\n## Known issues\n\nThe application has some bugs related to the wird values if you combine operations one after another. To prevent this please clear input before every new calculation. When deal with a negative numbers you should first choose the number and then the sign otherwise the final result will be incorrect.\n\n## Development server\n\nTo start a local development server, run:\n\n```bash\nnpm install\nng serve --open\n```\n\nOnce the server is running, it will open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.\n\n## Building\n\nTo build the project run:\n\n```bash\nng build\n```\n\nThis will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.\n\n## Running unit tests\n\nTo execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:\n\n```bash\nng test\nng test code-coverage\n```\n\nNote: Currently there are tests cases only for calculator component.\n\n```\n=============================== Coverage summary ===============================\nStatements   : 78.09% ( 82/105 )\nBranches     : 62.06% ( 18/29 )\nFunctions    : 66.66% ( 12/18 )\nLines        : 82.47% ( 80/97 )\n================================================================================\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenzovisa%2Fangular-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenzovisa%2Fangular-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenzovisa%2Fangular-calculator/lists"}