# ng4-weather

> If you want the information regarding weather of a particular city, then ```ng4-weather``` is for you.

Latest version **0.0.9** (published 2017-11-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng4-weather
pnpm add ng4-weather
yarn add ng4-weather
bun add ng4-weather
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2017-11-23 |
| First published | 2017-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 12 |
| Known vulnerabilities | 0 (+21 in 3 direct dependencies) |
| Install scripts | no |
| Maintainers | tooshar |
| Keywords | weather, ng4-weather, npm weather, weather npm, weather information npm, ng weather |

## Links

- npm: https://www.npmjs.com/package/ng4-weather
- npm.io page: https://npm.io/package/ng4-weather

## Dependencies (12)

- [rxjs](https://npm.io/package/rxjs.md) ^5.4.2
- [core-js](https://npm.io/package/core-js.md) ^2.4.1
- [zone.js](https://npm.io/package/zone.js.md) ^0.8.14
- [@angular/core](https://npm.io/package/@angular/core.md) ^4.2.4
- [@angular/http](https://npm.io/package/@angular/http.md) ^4.2.4
- [@angular/forms](https://npm.io/package/@angular/forms.md) ^4.2.4
- [@angular/common](https://npm.io/package/@angular/common.md) ^4.2.4
- [@angular/router](https://npm.io/package/@angular/router.md) ^4.2.4
- [@angular/compiler](https://npm.io/package/@angular/compiler.md) ^4.2.4
- [@angular/animations](https://npm.io/package/@angular/animations.md) ^4.2.4
- [@angular/platform-browser](https://npm.io/package/@angular/platform-browser.md) ^4.2.4
- [@angular/platform-browser-dynamic](https://npm.io/package/@angular/platform-browser-dynamic.md) ^4.2.4

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.9 (latest) — 2017-11-23
- 0.0.8 — 2017-11-23
- 0.0.7 — 2017-11-22
- 0.0.6 — 2017-11-22
- 0.0.5 — 2017-11-22
- 0.0.4 — 2017-11-22
- 0.0.3 — 2017-11-22
- 0.0.1 — 2017-11-22
- 0.0.0 — 2017-11-22

## README

# Ng4-Weather

If you want the information regarding weather of a particular city, then ```ng4-weather``` is for you.

## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Installation
Install via NPM:

```sh
npm install --save ng4-weather
```
`or`
```sh
npm i --save ng4-weather
```
### Usage & Quick Guide
Step 1 : 
Import `HttpModule` in `app.module.js`
```sh
import { HttpModule } from '@angular/http';

...

@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
    HttpModule
    ...
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```
Step 2 :
In any of your `fileName.ts` :
```sh
import { Search } from 'ng4-weather/core';
```
Step 3 :
```sh
Search("cityName", http, (data) => {
      // do something here
      console.log(data);
    })
```

`First parameter` is the, `name of city`, you want to search.
`Second parameter` is the, `Http object`.
`Third parameter` is the callback function, i.e. `data` here contains all the attributes that you can use in your code.

Use `data.attributeName` or `data.attributeName.subAttributeName`.
For example : `data.city` , `data.main.temp` etc.

### Note
You can change `Unit of temperature` by using respective mathematical formulas.
For example : `data.main.temp` gives value in `Kelvin`. So, for getting unit of temperature in `Celcius`, subtract `273.15` from `Kelvin` value.

License
----

MIT

---
_Source: https://npm.io/package/ng4-weather · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
