rb-weather

This library is for get weather of given location.

Usage no npm install needed!

<script type="module">
  import rbWeather from 'https://cdn.skypack.dev/rb-weather';
</script>

README

Weather

Weather is a module for obtaining weather information by city name. And you can change the format of temperature using unit attribute - (metric, standard, imperial).

Features

  • You can change format of the temperature.
  • It will show weather by city name.
  • Local time and date of that city.
  • Multiple UI enabled.
  • You can add your custom css

Installation

npm install rb-weather

Usage

import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AppComponent } from "./app.component";
import { HttpClientModule } from "@angular/common/http";
import { DatePipe } from "@angular/common";
import { WeatherModule } from "rb-weather";
@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    HttpClientModule,
    //For using won wether library
    WeatherModule,
  ],
  providers: [DatePipe],
  bootstrap: [AppComponent],
})
export class AppModule {}

HTML FILE

<rb-weather
  [weatherLocation]="'Kolkata'"
  [unit]="'metric'"
  [setTheme]="'1'"
  [backgroundImg]="'https://ik.imagekit.io/yqruxjujs95/default-image.jpg?updatedAt=1634994894512'"
  [customCss]="'your-custom-css'"
></rb-weather>

Variables

  • weatherLocation : String -- mandatory
  • unit : String -- mandatory
  • setTheme : String -- Optional
  • backgroundImg: String -- Optional
  • showTime: boolean -- Optional
  • showDate: boolean -- Optional

Notes

  • It uses openweathermap.org

DEMO

This is a screen shot of actual UI of this library Temlate one Template two

License

Licensed under The MIT License (MIT)
For the full copyright and license information, please view the LICENSE.txt file.

Buy me a coffe

For Paypal Users https://paypal.me/biswasrajat?locale.x=en_GB

For UPI users UPI QR CODE

Contact me

Drop a mail to biswas.rajat811@gmail.com with subject line NPM LIBRARY QUERY or NPM LIBRARY QUERY FOR CUSTOMIZATION or NPM LIBRARY BUG