{"id":19693900,"url":"https://github.com/lemoncloud-io/lemon-pets-angular","last_synced_at":"2025-02-27T10:13:51.388Z","repository":{"id":36980446,"uuid":"487736424","full_name":"lemoncloud-io/lemon-pets-angular","owner":"lemoncloud-io","description":"Pets Like Angular SPA Example","archived":false,"fork":false,"pushed_at":"2022-07-07T04:47:11.000Z","size":1631,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-10T09:16:32.927Z","etag":null,"topics":[],"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/lemoncloud-io.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}},"created_at":"2022-05-02T06:14:41.000Z","updated_at":"2022-07-27T02:00:01.000Z","dependencies_parsed_at":"2022-09-09T20:32:05.979Z","dependency_job_id":null,"html_url":"https://github.com/lemoncloud-io/lemon-pets-angular","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemoncloud-io%2Flemon-pets-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemoncloud-io%2Flemon-pets-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemoncloud-io%2Flemon-pets-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemoncloud-io%2Flemon-pets-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemoncloud-io","download_url":"https://codeload.github.com/lemoncloud-io/lemon-pets-angular/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241002877,"owners_count":19892277,"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-11-11T19:18:52.798Z","updated_at":"2025-02-27T10:13:51.355Z","avatar_url":"https://github.com/lemoncloud-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LemonPetsAngular\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.3.4.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.\n\n## Methoda of uploading Image using API\n\nTO upload an image we will call a function say onChange() Using which we will get the image e.g\nonChange({ target }: Event) {\nconst { files } = target as HTMLInputElement;\nif (files) this.uploadedFile = files[0];\nthis.uploadImage();\n}\n\nand call another function withing say uploadImage() which will help us to posr the image to the server using API e.g\n// add file to FormData object\nconst fd = new FormData();\nfd.append('file1', this.uploadedFile);\n\n    // send `POST` request\n    console.log(this.uploadedFile);\n    console.log(fd);\n    fetch('https://api.pets-like.com/img-v1/upload', {\n      method: 'POST',\n      body: fd,\n    })\n      .then((res) =\u003e res.json())\n      .then((json) =\u003e {\n        console.log(json);\n        this.updateProfile = json.list[0];\n      })\n      .catch((err) =\u003e console.error(err,));\n\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemoncloud-io%2Flemon-pets-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemoncloud-io%2Flemon-pets-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemoncloud-io%2Flemon-pets-angular/lists"}