4 ms·
Not sure if this helps, but trying to learn Angular2 I wrote a weather app with it using RC5. It is not the cleanest and I never used Angular 1 so I can't do a
by quaffapint 10y ago
Not sure if this helps, but trying to learn Angular2 I wrote a weather app with it using RC5. It is not the cleanest and I never used Angular 1 so I can't do a comparison.
https://github.com/mattsmithdev/weathercard.angular2 https://github.com/mattsmithdev/weathercard.angular2
- lloyd-christmas 10y agoyou can refactor those nested observables using mergeMap: this._settingsService.settings$.mergeMap(settings => { this.settings = settings; return this._weatherService.getLatestWeather(this._location, settings); }) .subscribe( weather => this.weather = weather, error => this.errorMessage = <any>error );
- quaffapint 10y agoThanks. Learning observables was definitely a little challenging, so I appreciate the insight.
- namelezz 10y agoThanks you for sharing such a beautiful weather app.