Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-weather-widget

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-weather-widget

[![npm version](https://img.shields.io/npm/v/angular2-weather-widget.svg)](https://www.npmjs.com/package/angular2-weather-widget) <!-- [![downloads](https://img.shields.io/npm/dt/angular2-weather-widget.svg)](https://www.npmjs.com/package/angular2-weathe

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
decreased by-15.38%
Maintainers
1
Weekly downloads
 
Created
Source

Angular 2/4/6/8 Weather Widget

npm version

Angular 2+ Weather Widget component for web applications. Easy and Highly customisable.

alt text

Getting Started

Installation

  • The Weather Widget package is published on the npm Registry.

  • Install the package : npm install angular2-weather-widget --save

  • Once installed import AngularWeatherWidgetModule from the installed package into your module as follows:

Usage

Import AngularWeatherWidgetModule into NgModule in app.module.ts. Angular's HttpClientModule and CommonModule is also required.

import { AngularWeatherWidgetModule } from 'angular2-weather-widget';
import { HttpClientModule } from '@angular/common/http';
import { CommonModule } from '@angular/common';

@NgModule({
  // ...
  imports: [
    AngularWeatherWidgetModule,
    HttpClientModule,
    CommonModule
  ]
  // ...
})
  • We are using "weatherstack" weather api to get weather details so SIGNUP and genereate api key for your project.

Add the following component tag in you template (no properties)

<angular-weather-widget
  [APIKEY]="'APIKEY'">
</angular-weather-widget>

Full properties

<angular-weather-widget
  [APIKEY]="'APIKEY'"
  [width]="'380px'"
  [height]="'auto'"
  [backgroundColor]="'green'" 
  [isBoxShadow]="true"
  [borderRadius]="'5px'"
  [locationFontSize]="'35px'"
  [locationFontColor]="'#fff'"
  [status]="true"
  [statusFontColor]="'#fff'"
  [statusFontSize]="'18px'"
  [temperature]="true"
  [tempratureFontColor]="'#fff'"
  [tempratureFontSize]="'75px'"
  [weatherImages]="true"
  [weatherImageWidth]="'110px'"
  [weatherImageHeight]="'110px'"
  [geoLocation]="true"
  [location]="''"
  [isWind]="true"
  [windFontColor]="'#fff'"
  [windFontSize]="'17px'">
</angular-weather-widget>

Properties

The following list of properties are supported by the component.

PropertyTypeDescriptionDefault Value
APIKEYStringAPI key from APIUXAPIKEY
widthStringWidth of the weather card280px
heightStringHeight of the weather cardauto
backgroundColorStringBackground color of the weather card#2a2828
isBoxShadowBooleanBox shadow of the weather cardtrue
borderRadiusStringBorder-radius of the weather card5px
locationFontSizeStringFont size of the location text40px
locationFontColorStringColor of the location text#fff
statusBooleanCurrent weather statustrue
statusFontSizeStringFont size of the location text18px
statusFontColorStringColor of the status text#fff
temperatureBooleanTemperature of the locationtrue
tempratureFontSizeStringFont size of the temperature text80px
tempratureFontColorStringColor of the temperature text#fff
weatherImagesBooleanWeather icontrue
weatherImageWidthStringWeather icon width100px
weatherImageHeightStringWeather icon height100px
geoLocationBooleanAccess/Show weather of the user's locationtrue
locationStringShow one specific location's weather''
isWindBooleanWind of the locationtrue
windFontSizeStringFont size of the wind text20px
windFontColorStringColor of the wind text#fff

Run locally

  • Clone the repository or downlod the .zip,.tar files.
  • Run npm install
  • Run ng serve for a dev server
  • Navigate to http://localhost:4200/

License

MIT License.

Keywords

FAQs

Package last updated on 21 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc