/**
 * Created by Aashish on 2/8/2017.
 */
app.service('cityService', [function () {
  this.city = "New York, NY";
  this.latitude = null;
  this.longitude = null;
}]);

app.factory('weatherFactory', function ($resource) {

  var API_PATH = 'http://api.openweathermap.org/data/2.5/forecast/daily';
  var APP_ID = '089c7f3f5a9253c4eadba886da4e4f5c';
  var weatherResource = $resource(API_PATH, {appid: APP_ID, callback: "JSON_CALLBACK"}, { get: { method: "JSONP" }});

  return {
    getWeather: function (days, city, latitude, longitude) {
      var weatherParams = {};
      if (city) {
        weatherParams.q = city;
      } else if (latitude && longitude) {
        weatherParams.lat = latitude;
        weatherParams.lon = longitude;
      }
      weatherParams.cnt = days;

      return weatherResource.get(weatherParams, function (successResult) {
        return successResult;
      }, function (errorResult) {
        return errorResult;
      });
    }
  }
});

@@ -391,22 +391,8 @@
 H, %7B
-appid: APP_ID,
  cal
@@ -413,16 +413,17 @@
 ALLBACK%22
+ 
 %7D, %7B get
@@ -758,16 +758,52 @@
  = days;
+%0A      weatherParams.appid = APP_ID;
 %0A%0A      

Update services.js