![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@communitilink/angular-weather-widget
Advanced tools
CommunitiLink Modified Weather Widget based on Open Weather Map Api
https://krzysztofsaja.github.io/angular-weather-widget/
Weather Widget based on Open Weather Map Api
Install through npm:
npm install --save angular-weather-widget
Then include in your apps module:
import { Component, NgModule } from '@angular/core';
import { AngularWeatherWidgetModule, WeatherApiName } from 'angular-weather-widget';
@NgModule({
imports: [
AngularWeatherWidgetModule.forRoot({
key: OPEN_WEATHER_MAP_API_KEY,
name: WeatherApiName.OPEN_WEATHER_MAP,
baseUrl: 'http://api.openweathermap.org/data/2.5'
})
]
})
export class MyModule {}
Use in one of your apps components:
import { Component } from '@angular/core';
import { WeatherSettings, TemperatureScale, ForecastMode, WeatherLayout } from 'angular-weather-widget';
@Component({
template: '<weather-widget [settings]="settings"></weather-widget>'
})
export class MyComponent {
settings: WeatherSettings = {
location: {
cityName: 'Szczecin'
},
backgroundColor: '#347c57',
color: '#ffffff',
width: '300px',
height: 'auto',
showWind: false,
scale: TemperatureScale.CELCIUS,
forecastMode: ForecastMode.DETAILED,
showDetails: false,
showForecast: true,
layout: WeatherLayout.WIDE,
language: 'en'
};
}
If you set proper OPEN_WEATHER_MAP_API_KEY key, data will be retrived from Open Weather Map Api. However, you can also pass relevant information from parent component, eg.
import { Component } from '@angular/core';
import { WeatherSettings, TemperatureScale, ForecastMode } from 'angular-weather-widget';
@Component({
template: '<weather-widget [currentWeather]=currentWeather [forecast]=forecast [settings]="settings"></weather-widget>'
})
export class MyComponent {
currentWeather: CurrentWeather = CURRENT_WATHER_MOCK;
forecast: Forecast[] = FORECAST_MOCK;
settings: WeatherSettings = {
location: {
cityName: 'Szczecin'
}
};
}
You may also find it useful to view the demo source. You may also find it useful to view the demo source.
<script src="node_modules/angular-weather-widget/bundles/angular-weather-widget.umd.js"></script>
<script>
// everything is exported angularWeatherWidget namespace
</script>
All documentation is auto-generated from the source via compodoc and can be viewed here: https://krzysztofsaja.github.io/angular-weather-widget/docs/
Run yarn start
to start a development server on port 8000 with auto reload + tests.
Run yarn test
to run tests once or yarn run test:watch
to continually run tests.
yarn run release
MIT
FAQs
CommunitiLink Modified Weather Widget based on Open Weather Map Api
We found that @communitilink/angular-weather-widget demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.