是否有可能或者有更好的方法在$ scope.found返回后,在ng-click事件启动导引头功能的情况下运行执行函数。
$scope.adder = {
seeker:function(){
$scope.found = null;
$scope.found = $scope.services.find(function(service){
return service;
});
Loader.showLoading('Added to cart');
return $scope.found;
},
execute:function($scope,found){
if($scope.found != null){
$scope.cart.addItem(found.title, found.pricing, found.qty);
Loader.hideLoading();
}
}
}