June 2014
Intermediate to advanced
696 pages
38h 52m
English
With the controller in place, you can define the view to consume the weather data. Listing 29.11 shows the basic template that consumes the weather data from the scope and renders it as shown in Figure 29.2.
Figure 29.2 The weather view allows you to quickly see the weather in a list of cities and add additional cities.
A text input at the top accepts the new city name and binds it to locationIn and a button that calls addCity() in the controller when clicked. Notice that all the weather data comes from the $scope.weather variable and is rendered using AngularJS expressions.
Listing 29.11 weather.html: Implementing ...
Read now
Unlock full access