Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在调用另一个函数-angularjs时隐藏上一条flash消息_Javascript_Angularjs_Flash - Fatal编程技术网

Javascript 如何在调用另一个函数-angularjs时隐藏上一条flash消息

Javascript 如何在调用另一个函数-angularjs时隐藏上一条flash消息,javascript,angularjs,flash,Javascript,Angularjs,Flash,调用function2时,我想将function1的闪烁消息隐藏在function2中 我已经给了暂停淡出闪光信息的时间。但需要在超时前淡出另一个函数中特定函数的闪烁消息 $scope.function1 = function() { var response = { "json": { "response": {

调用function2时,我想将function1的闪烁消息隐藏在function2中

我已经给了暂停淡出闪光信息的时间。但需要在超时前淡出另一个函数中特定函数的闪烁消息

$scope.function1 = function() {
var response = {
                "json": 
                  {
                   "response": 
                     {
                      "status": "Success"
                     }
                  }
               };

               if (response.success != undefined) {
                   FlashService.Success(response.message);
                   window.scrollTo(500, 0);
                   $timeout(function(){
                      delete $rootScope.flash;
                   }, 9000);
               } else {
                     if(response.json.response.status == "Success") {
                        FlashService.Success("Updated successfully", true);
                        window.scrollTo(500, 0);
                        $timeout(function(){
                           delete $rootScope.flash;
                        }, 9000);
                     } else {
                        FlashService.Success(response.json.response.status);
                        window.scrollTo(500, 0);
                        $timeout(function(){
                           delete $rootScope.flash;
                        }, 9000);
                     }
                  }
              };

$scope.function2 = function() {
     console.log("Inside function2");
};

$scope.function1();



<button class="btn btn-primary" ng-click="function2()">Call</button>
$scope.function1=function(){
var响应={
“json”:
{
“答复”:
{
“状态”:“成功”
}
}
};
if(response.success!=未定义){
FlashService.Success(response.message);
滚动到(500,0);
$timeout(函数(){
删除$rootScope.flash;
}, 9000);
}否则{
如果(response.json.response.status==“成功”){
FlashService.Success(“更新成功”,true);
滚动到(500,0);
$timeout(函数(){
删除$rootScope.flash;
}, 9000);
}否则{
成功(response.json.response.status);
滚动到(500,0);
$timeout(函数(){
删除$rootScope.flash;
}, 9000);
}
}
};
$scope.function2=函数(){
控制台日志(“内部函数2”);
};
$scope.function1();
呼叫

您已将此[闪存]标记为。。。您是否使用adobe的跨平台运行时flash?adobe的跨平台意思是什么?您知道flash是什么吗?flash是向用户发出的关于函数错误或成功状态的警告消息hh,这就是您所说的
flash
-如果您将鼠标悬停在问题中的flash标记上,你会看到标签是指Adobe的跨平台多媒体平台-我的坏