npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular2-weather-widget

v1.0.1

Published

[![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

Downloads

53

Readme

Angular 2/4/6/8 Weather Widget

npm version

Angular 2+ Weather Widget component for web applications. Easy and Highly customisable. Stackblitz example (need API key)

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 "openweathermap" 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'"
  [humidityFontColor]="'#fff'" 
  [humidityFontSize]="'17px'">
</angular-weather-widget>

Properties

The following list of properties are supported by the component.

| Property |Type | Description | Default Value | |:--- |:--- |:--- |:--- | | APIKEY | String | API key from APIUX | APIKEY | | width | String | Width of the weather card | 280px | | height | String | Height of the weather card | auto | | backgroundColor | String | Background color of the weather card | #2a2828 | | isBoxShadow | Boolean | Box shadow of the weather card | true | | borderRadius | String | Border-radius of the weather card | 5px | | locationFontSize | String | Font size of the location text | 40px | | locationFontColor | String | Color of the location text | #fff | | status | Boolean | Current weather status | true | | statusFontSize | String | Font size of the location text | 18px | | statusFontColor | String | Color of the status text | #fff | | temperature | Boolean | Temperature of the location | true | | tempratureFontSize | String | Font size of the temperature text | 80px | | tempratureFontColor | String | Color of the temperature text | #fff | | weatherImages | Boolean | Weather icon | true | | weatherImageWidth | String | Weather icon width | 100px | | weatherImageHeight | String | Weather icon height | 100px | | geoLocation | Boolean | Access/Show weather of the user's location | true | | location | String | Show one specific location's weather | '' | | isWind | Boolean | Wind of the location | true | | windFontSize | String | Font size of the wind text | 20px | | windFontColor | String | Color of the wind text | #fff | | humidityFontColor | String | Font size of the humidity text | 20px | | humidityFontSize | String | Color of the humidity 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.