当我执行我的功能时,我收到此错误" this.push is not a function
"是什么造成的?这不是我第一次使用Angular forEach
和this.push
$scope.search_subCategory_businesses= function()
{
alert("tigidi tigidi subcategory");
//$scope.busi_es = sharedProperties.getProperty();
$scope.busi_es=JSON.parse(window.localStorage.getItem("biz"));
window.localStorage.removeItem("biz");
console.log("sharedProperty hahahaah is",$scope.busi_es);
angular.forEach($scope.busi_es,function(value,key)
{
$scope.business = value;
if($scope.business.logo == '' || $scope.business.logo==null)
{
$scope.business.logo=config.BaseImageURL+"uploads/defbanner.png"
}else
{
$scope.business.logo=config.BaseImageURL+$scope.business.logo;
}
this.push($scope.business); //complaings
},$scope.businesses);
//return $scope.businesses;
};
$scope.search_subCategory_businesses();