May 2018
Intermediate to advanced
512 pages
11h 3m
English
The idea strategy will be to use *ngIf, which is a structural directive, meaning Angular will stop traversing DOM tree elements beyond a falsy statement.
In the CurrentWeather component, we can easily check to see whether the current variable is null or undefined before attempting to render the template:
src/app/current-weather/current-weather.component.html<div *ngIf="current"> ...</div>
Now observe the console log and that no errors are being reported. You always ensure that your Angular application reports zero console errors. If you're still seeing errors in the console log, ensure that you have correctly reverted the ...
Read now
Unlock full access