Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/424.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代码?_Javascript_Jquery_Angularjs_Twitter Bootstrap - Fatal编程技术网

Javascript 如何停止引导确认对话框的AngularJs代码?

Javascript 如何停止引导确认对话框的AngularJs代码?,javascript,jquery,angularjs,twitter-bootstrap,Javascript,Jquery,Angularjs,Twitter Bootstrap,基本上,我正在将老式的window.confirm对话框转换为bootsrap对话框。我在angular代码中调用Javascript函数,这是 function showConfirmation(msg) { jQuery('#confirmationModal .modal-body h2').html(msg); jQuery('#confirmationModal').modal(); } 角度代码: { Converting from old st

基本上,我正在将老式的window.confirm对话框转换为bootsrap对话框。我在angular代码中调用Javascript函数,这是

function showConfirmation(msg)
{
    jQuery('#confirmationModal .modal-body h2').html(msg);
    jQuery('#confirmationModal').modal();       
}
角度代码:

{  
 Converting from old style confirmation box
 //if(!window.confirm('Are you sure ')

     var msg= 'Are you sure'; 
    if(ShowConfirmation(msg))
    {

    }
}

现在,在Angular代码中,我需要从确认对话框中获取真/假值,还需要根据用户输入恢复执行。

您能看一下下面的内容吗? 您可以编写回调函数并将更改应用于变量。
请确保您必须在回拨功能中使用$scope.apply。

我倾向于创建一个模式服务,其中一个作用域可以从控制器传递到另一个控制器,然后再传递回来。以上代码在我看来不像是“角度方式”。@Danielshillock您是在角度代码中创建模式html的吗?您有示例代码吗?请看-一个非常好的指令资源我确实看起来有角度的ui或bootbox。但我想创造我自己的