此代码无效:
<td><img src="{{$rootScope.s3BucketUrl}}"/></td>
这就是它定义的地方:
var appCtrl = app.controller('AppCtrl', function($scope, $resource, $location, $route, sharedProperties, $q, $rootScope){
defer = $q.defer();
//$rootScope.s3BucketUrl = 'http://lynd.s3.amazonaws.com/';//comment below one when live
$rootScope.s3BucketUrl = 'http://lynd-test.s3.amazonaws.com/';
//code omitted
});
AppCtrl首先绑定在body标签上。
有人可以建议我如何打印$ rootScope变量?
答案 0 :(得分:10)