{"id":24589105,"url":"https://github.com/krzysztofsaja/angular-weather-widget","last_synced_at":"2025-04-30T05:06:45.836Z","repository":{"id":57179373,"uuid":"98056732","full_name":"krzysztofsaja/angular-weather-widget","owner":"krzysztofsaja","description":"Angualar 2+ weather widget component with Open Weather Map Api support","archived":false,"fork":false,"pushed_at":"2017-12-20T22:10:38.000Z","size":4477,"stargazers_count":15,"open_issues_count":4,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T05:06:32.593Z","etag":null,"topics":["angular2","angular4","javascript-library","weather","weather-app","widget"],"latest_commit_sha":null,"homepage":"","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/krzysztofsaja.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-07-22T20:39:46.000Z","updated_at":"2022-07-24T17:19:43.000Z","dependencies_parsed_at":"2022-09-09T19:00:15.696Z","dependency_job_id":null,"html_url":"https://github.com/krzysztofsaja/angular-weather-widget","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzysztofsaja%2Fangular-weather-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzysztofsaja%2Fangular-weather-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzysztofsaja%2Fangular-weather-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzysztofsaja%2Fangular-weather-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krzysztofsaja","download_url":"https://codeload.github.com/krzysztofsaja/angular-weather-widget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644842,"owners_count":21620634,"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":["angular2","angular4","javascript-library","weather","weather-app","widget"],"created_at":"2025-01-24T08:13:43.031Z","updated_at":"2025-04-30T05:06:45.816Z","avatar_url":"https://github.com/krzysztofsaja.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Weather Widget\n[![Build Status](https://travis-ci.org/krzysztofsaja/angular-weather-widget.svg?branch=master)](https://travis-ci.org/krzysztofsaja/angular-weather-widget)\n[![codecov](https://codecov.io/gh/krzysztofsaja/angular-weather-widget/branch/master/graph/badge.svg)](https://codecov.io/gh/krzysztofsaja/angular-weather-widget)\n[![npm version](https://badge.fury.io/js/angular-weather-widget.svg)](http://badge.fury.io/js/angular-weather-widget)\n[![devDependency Status](https://david-dm.org/krzysztofsaja/angular-weather-widget/dev-status.svg)](https://david-dm.org/krzysztofsaja/angular-weather-widget?type=dev)\n[![GitHub issues](https://img.shields.io/github/issues/krzysztofsaja/angular-weather-widget.svg)](https://github.com/krzysztofsaja/angular-weather-widget/issues)\n[![GitHub stars](https://img.shields.io/github/stars/krzysztofsaja/angular-weather-widget.svg)](https://github.com/krzysztofsaja/angular-weather-widget/stargazers)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/krzysztofsaja/angular-weather-widget/master/LICENSE)\n\n## Demo\nhttps://krzysztofsaja.github.io/angular-weather-widget/\n\n## Table of contents\n\n- [About](#about)\n- [Installation](#installation)\n- [Documentation](#documentation)\n- [Development](#development)\n- [License](#license)\n\n## About\n\nWeather Widget based on Open Weather Map Api\n\n## Installation\n\nInstall through npm:\n```\nnpm install --save angular-weather-widget\n```\n\nThen include in your apps module:\n\n```typescript\nimport { Component, NgModule } from '@angular/core';\nimport { AngularWeatherWidgetModule, WeatherApiName } from 'angular-weather-widget';\n\n@NgModule({\n  imports: [\n        AngularWeatherWidgetModule.forRoot({\n          key: OPEN_WEATHER_MAP_API_KEY,\n          name: WeatherApiName.OPEN_WEATHER_MAP,\n          baseUrl: 'http://api.openweathermap.org/data/2.5'\n        })\n  ]\n})\nexport class MyModule {}\n```\n## Configuration\n\nUse in one of your apps components:\n```typescript\nimport { Component } from '@angular/core';\nimport { WeatherSettings, TemperatureScale, ForecastMode, WeatherLayout } from 'angular-weather-widget';\n\n\n@Component({\n  template: '\u003cweather-widget [settings]=\"settings\"\u003e\u003c/weather-widget\u003e'\n})\nexport class MyComponent {\n    settings: WeatherSettings = {\n      location: {\n        cityName: 'Szczecin'\n      },\n      backgroundColor: '#347c57',\n      color: '#ffffff',\n      width: '300px',\n      height: 'auto',\n      showWind: false,\n      scale: TemperatureScale.CELCIUS,\n      forecastMode: ForecastMode.DETAILED,\n      showDetails: false,\n      showForecast: true,\n      layout: WeatherLayout.WIDE,\n      language: 'en'\n    };\n}\n```\n\nIf you set proper OPEN_WEATHER_MAP_API_KEY key, data will be retrived from Open Weather Map Api. However, you can also pass relevant information from parent component, eg.\n\n```typescript\nimport { Component } from '@angular/core';\nimport { WeatherSettings, TemperatureScale, ForecastMode } from 'angular-weather-widget';\n\n\n@Component({\n  template: '\u003cweather-widget [currentWeather]=currentWeather [forecast]=forecast  [settings]=\"settings\"\u003e\u003c/weather-widget\u003e'\n})\nexport class MyComponent {\n  currentWeather: CurrentWeather = CURRENT_WATHER_MOCK;\n  forecast: Forecast[] = FORECAST_MOCK;\n  settings: WeatherSettings = {\n  location: {\n    cityName: 'Szczecin'\n  }\n};  \n}\n```\n\nYou may also find it useful to view the [demo source](https://github.com/krzysztofsaja/angular-weather/blob/master/demo/demo.component.ts).\nYou may also find it useful to view the [demo source](https://github.com/krzysztofsaja/angular-weather-widget/blob/master/demo/demo.component.ts).\n\n### Usage without a module bundler\n```\n\u003cscript src=\"node_modules/angular-weather-widget/bundles/angular-weather-widget.umd.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    // everything is exported angularWeatherWidget namespace\n\u003c/script\u003e\n```\n\n## Documentation\nAll documentation is auto-generated from the source via [compodoc](https://compodoc.github.io/compodoc/) and can be viewed here:\nhttps://krzysztofsaja.github.io/angular-weather-widget/docs/\n\n## Development\n\n### Prepare your environment\n* Install [Node.js](http://nodejs.org/) and [yarn](https://yarnpkg.com/en/docs/install)\n* Install local dev dependencies: `yarn` while current directory is this repo\n\n### Development server\nRun `yarn start` to start a development server on port 8000 with auto reload + tests.\n\n### Testing\nRun `yarn test` to run tests once or `yarn run test:watch` to continually run tests.\n\n### Release\n* Bump the version in package.json (once the module hits 1.0 this will become automatic)\n```bash\nyarn run release\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzysztofsaja%2Fangular-weather-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrzysztofsaja%2Fangular-weather-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzysztofsaja%2Fangular-weather-widget/lists"}