Reader small image

You're reading from  Angular 6 for Enterprise-Ready Web Applications

Product typeBook
Published inMay 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781786462909
Edition1st Edition
Languages
Right arrow
Author (1)
Doguhan Uluca
Doguhan Uluca
author image
Doguhan Uluca

Doguhan Uluca is a Principal Fellow at Excella in Washington, D.C., where he leads strategic initiatives and delivers critical systems. He has technical expertise in usability, mobility, performance, scalability, cybersecurity, and architecture. He is the author of the Angular for Enterprise Application Development books, has spoken at over 30 conferences, and is an Angular GDE Alumni. Doguhan has delivered solutions for Silicon Valley startups, Fortune 50 companies, and the U.S. Federal Government, and he is passionate about contributing to open-source projects and teaching.
Read more about Doguhan Uluca

Right arrow

Troubleshooting common Angular errors

Our unit tests and e2e tests are now working. In this section, you intentionally introduce an easy-to-make mistake so that you can become familiar with real-life errors that can be happen while developing your applications and gain a solid understanding of the tooling that makes make you an effective developer.

Let's pretend that we made an innocent mistake when copying and pasting the URL from the API documentation page on OpenWeatherMap.org and forgot to add http:// in front of it. This is an easy mistake to make:

src/app/weather/weather.service.ts
...
return this.httpClient
.get<ICurrentWeatherData>(
`api.openweathermap.org/data/2.5/weather?q=${city},${country}&appid=${environment.appId}`
).pipe(map(data => this.transformToICurrentWeather(data)))
...

Your app will compile successfully, but when you inspect the results...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Angular 6 for Enterprise-Ready Web Applications
Published in: May 2018Publisher: PacktISBN-13: 9781786462909

Author (1)

author image
Doguhan Uluca

Doguhan Uluca is a Principal Fellow at Excella in Washington, D.C., where he leads strategic initiatives and delivers critical systems. He has technical expertise in usability, mobility, performance, scalability, cybersecurity, and architecture. He is the author of the Angular for Enterprise Application Development books, has spoken at over 30 conferences, and is an Angular GDE Alumni. Doguhan has delivered solutions for Silicon Valley startups, Fortune 50 companies, and the U.S. Federal Government, and he is passionate about contributing to open-source projects and teaching.
Read more about Doguhan Uluca