src/angular-weather.js
function prepareWeather(weatherData) {
      return {
        temperature: weatherData.main.temp,
        icon: (angular.isDefined(weatherIcons[weatherData.weather[0].icon])) ? weatherData.weather[0].icon : weatherData.weather[0].id,
        description: weatherData.weather[0].description
      }
    }
function prepareWeather(weatherData) {
      return {
        temperature: weatherData.main.temp,
        icon: (angular.isDefined(weatherIcons[weatherData.weather[0].icon])) ? weatherData.weather[0].icon : weatherData.weather[0].id,
        description: weatherData.weather[0].description
      }
    }
function prepareWeather ( weatherData ) { return { temperature : weatherData . main . temp , icon : ( angular . isDefined ( weatherIcons [ weatherData . weather [ 0 ] . icon ] ) ) ? weatherData . weather [ 0 ] . icon : weatherData . weather [ 0 ] . id , description : weatherData . weather [ 0 ] . description } }
Prepare Weather object with order by list, tree and collection indexed by id.

Return the Weather object into a promises.

@param weatherData - {$q.promise)
Promise of list of Weather, comming from cache or the server.
Prepare Weather object with order by list tree and collection indexed by id .