Code Monkey home page Code Monkey logo

forecast-app's Introduction

ForecastApp

This project was generated with Angular CLI version 11.2.10.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/.

Running unit tests

Run ng test to execute the unit tests via Karma.

App features

  1. After page load, 5 random cities are generated from a list of european cities, then for every city, a request is sent to OpenWeatherMap API to retrieve its weather details.
  2. When a city card is clicked, then forecast data for the next 48 hours is displayed for that city.

App Architecture

  • src/app/services/weather/weather.service.ts

    This service contains a function getCitiesWeather which generates 5 random european cities, then for every generated city it calls getCityWeather which consumes openWeatherMap API to get that city's weather data.

  • src/app/app.component.ts:

    This is the main component which uses the service weatherService to get cities weather data (as explained above), then it exposes that data to its children components: weather-forecast and weather-recap

  • src/app/components/weather-recap/weather-recap.component.ts (weather-recap)

    This component displays a recap of a city weather data.

    alt text

  • src/app/components/weather-forecast/weather-forecast.component.ts

    This component displays 48 hours weather forecast for a particular city.

    alt text

forecast-app's People

Contributors

helaoutar avatar

Stargazers

Roman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.