Great tutorial!! I only have one issue with the icons link. Im getting an unsafe url warning, and have tried to bypass security using safeurl, and domsanitizer and still can't get the weather icon to appear. Any recommendations?
I did a little research and it looks like you can use both http and https connection when you load icons so when you are building your icon url, try to use the secure connection. For example: openweathermap.org/img/wn/10d@2x.png instead of openweathermap.org/img/wn/10d@2x.png. Please let me know if it didn't work.
I was able to recreate the "unsafe" error. This error shows up if the icon url is not properly constructed. For example, if there is an extra space before or an extra space somewhere in the middle of the url.
@@dkprogramming I went back earlier to fix the url as you mentioned in the last comment, and realized then that I had an extra space before the url. It works now thank you for letting me know. A silly mistake that I have made plenty of times.
It's hard to troubleshoot without looking at the code so I can just guess. This error tells you that you are not getting an observable from the function you are calling. Your function doesn't return anything if its return type is 'void'. Do you have the word 'return' in front of 'this.http.get...' line in your service?
If you go to the Friquently Asked Questions section and scroll all the way to the bottom, there is a part about different HTTP response codes and information about what to do. openweathermap.org/faq
God forbid that this video gets into the recommendations ... So you can’t learn Angular is closely related to TypeScript, and you didn’t give a damn about all the recommendations of the developers of Angular and TypeScript.
Any comments about improving this project are appreciated. This is the official Angular best practices guide: angular.io/guide/styleguide. It would be interesting to hear what exactly is not compliant with this guide. In terms of Typescript, the only thing I would change to make the project better would be to use an interface when I create an array of objects. Interface is an advanced concept, and I just didn't want to include it in this project. We will be using interfaces in my Address Book Angular project where we create a full CRUD application. Please let me know if you have any specific suggestions about making this application better.
Hi, I am getting stuck on this thing... please give some insight on this, as i am novice to Frontend .... Could not resolve "node_modules/bootstrap/dist/css.bootstrap.min.css" angular:styles/global:styles:1:8: 1 │ @import 'node_modules/bootstrap/dist/css.bootstrap.min.css'; ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can mark the path "node_modules/bootstrap/dist/css.bootstrap.min.css" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
Hi Bilal, You might have forgotten to put a comma (,) at the end on the line "node_modules/bootstrap/dist/css/bootstrap.min.css", inside your angular.json file. If not, try to uninstall Bootstrap by running command "npm uninstall bootstrap" and then install it again with "npm install bootstrap". There is another common pitfall. Inside the angular.json file, make sure you add the line in the right place. There are two "Style" blocks in that file. You need to use the first one. Let me know if it worked. Good luck!