Cannot read property ‘simpleforcast’ of undefined ? What is wrong with this? ?

  node.js, question

Thinking of reading the tutorial and writing a Chrome extension program similar to Currently’s weather forecast, I want to call the Weather api result in the view first, and the result is gg. It’s really can find no way out!
图片描述

/**
 * Created by lv on 2015/11/7.
 */
 var app = angular.module('myapp',[]);
 
 app.provider('Weather',function(){
 var apiKey = "";
 this.getUrl = function(type,ext){
 Return "http://api.wunderground.com/api/"add this.apiKey plus "/"add type plus "/q/" add ext plus'.' json';
 };
 this.$get = function($q,$http){
 var self = this;
 return {
 //service object
 getWeatherForecast: function(city){
 var d = $q.defer();
 $http({
 method: 'GET',
 url: self.getUrl("forecast",city),
 cache:true
 }).success(function(data){
 //Wunderweather interface returns
 //forecast object nested within forecast.simpleforcast property
 d.resolve(data.forcast.simpleforcast);
 }).error(function(err){
 d.reject(err);
 });
 return d.promise();
 bracket
 bracket
 };
 this.setApiKey = function(key){
 if(key) this.apiKey = key;
 };
 
 });
 app.config(function(WeatherProvider){
 WeatherProvider.setApiKey('39fb2e6f07af19f7-Yzz');
 });
 
 app.controller('mainController',function($scope,$timeout,Weather){
 //Build date Object
 $scope.date = {};
 //clock
 var upDateTime = function(){
 $scope.date.raw = new Date();
 $timeout(upDateTime,1000);
 };
 //Start function
 upDateTime();
 
 $scope.weather = {};
 Weather.getWeatherForecast("CA/San_Francisco")
 .then(function(data){
 $scope.weather.forcast  = data;
 });
 });
<div ng-controller="mainController">
 <div id="forecast">
 <pre>{{ weather.forecast | json }}</pre>
 </div>
 </div>

The first mistake was solved by a friend. What about the second cannot read property’ simple cast’ of undefined-. -! ! ! Can I get api by writing like this?

Get has already returned promise.