【问题标题】:angular-strap modal directive not showing content twiceangular-strap 模态指令不显示内容两次
【发布时间】:2013-10-03 11:58:40
【问题描述】:

我无法让 angular-strap 模态指令正常工作。内容只显示一次,之后我只得到 {{angular-expression-here}}。来自 angular-strap 页面的原始链接也不起作用。您只能在第一次看到“Hello Modal”。如果您想再次看到该消息,则必须对其进行更改(例如:“Hello Modal 1”)。

如果您使用“使用 $http 服务”按钮,就会发生这种情况。

笨蛋here

【问题讨论】:

  • 我也会很高兴有另一种选择。我真的只需要一个确认是/否)对话框(angularjs,如果可能的话,引导主题)

标签: angularjs angular-strap


【解决方案1】:

找到答案here

persist:true 添加到模态配置对我有用。

var modal = $modal({
        template: 'partials/main/modal.html',
        show: true,
        backdrop: 'static',
        scope: $scope,
        persist: true
    });

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-07
    • 1970-01-01
    • 2017-09-17
    • 2021-03-19
    相关资源
    最近更新 更多