标签: angular-bootstrap

打印内容大于1页的Bootstrap Modal页面会导致Google Chrome中断

试图让印刷适用于Modals.

在最新的谷歌浏览器中,使用最新的angular-ui-bootstrap 0.14.2,我们在列表或表格等大型内容溢出到下一页时遇到问题.

我已经完成了隐藏背景对象的必要更改:将以下样式添加到模式页面中:

@media print {
      body * {
        visibility: hidden;
      }
      #print-content * {
        visibility: visible;
        overflow: visible;
      }
      #mainPage * {
        display: none;
      }
      .modal {
        position: absolute;
        left: 0;
        top: 0;
        margin: 0;
        padding: 0;
        min-height: 550px;
      }
      li {
        page-break-after: auto;
      }
    }
Run Code Online (Sandbox Code Playgroud)

任何人都有快速解决方案吗?

Plunker:http://plnkr.co/edit/TV0ttEAw4LWJ6sGLjSTR?p = preview

您可以测试不同模态的打印预览和打印按钮.打印预览适用于当前页面,但不适用于模态.=(

angularjs angular-ui-bootstrap angular-bootstrap

4
推荐指数
1
解决办法
6390
查看次数

如何替换弃用的uib-datepicker-popup?

自从我将项目更新为"angular-bootstrap": "~1.2.4",我在控制台中发出警告:

uib-datepicker settings via uib-datepicker-popup attributes are deprecated and will be removed in UI Bootstrap 1.3, use datepicker-options attribute instead

uib-datepicker-popup 由日期格式或日期格式数组填充:

  • uib-datepicker-popup="dd-MMMM-yyyy" 在我的情况下

因此,在角度引导程序文档中,仍然显示了deprecated处理此案例的方法.

有谁知道如何迁移到新版本?

datepicker angularjs angular-bootstrap

4
推荐指数
1
解决办法
1万
查看次数

Angular NgbTypeahead

我正在使用来自Angular Bootstrap的typeahead - https://ng-bootstrap.github.io/#/components/typeahead/examples

一切正常,但我希望在一个文本框上有多个值.由于该字段是来自组,一旦选择了一个值,它就可以允许下一个,而不删除前一个.

angular-ui-typeahead angular-bootstrap ng-bootstrap angular

4
推荐指数
1
解决办法
6659
查看次数

将数据传递给Angular中的Twitter Bootstrap模式

我想显示一个模态框,询问用户是否要删除帖子.我无法弄清楚如何传递我在密钥参数中传递的密钥,我也可以在其中发出警报.

我从角度twitterbootstrap网站获取代码,但我无法找出传递数据以确认删除的方法.

谢谢穆罕默德

$scope.deletePost = function(key, post, event) {
    alert(key);
    var modalInstance = $modal.open({
        templateUrl: 'deletePost.html',
        controller: ModalInstanceCtrl,
        resolve: {
            items: function() {
                return $scope.posts;
            }
        },
    })

    modalInstance.result.then(function(selectedItem) {
        $scope.selected = selectedItem;
        alert(selectedItem);
    });
};


var ModalInstanceCtrl = function($scope, $modalInstance, items) {
    $scope.items = items;
    $scope.selected = {
        item: $scope.items[0]
    };
    $scope.ok = function() {
        $modalInstance.close($scope.selected.item);
    };

    $scope.cancel = function() {
        $modalInstance.dismiss('cancel');
    };
};
Run Code Online (Sandbox Code Playgroud)

angularjs firebase angular-bootstrap

3
推荐指数
1
解决办法
1万
查看次数

AngularJS + RequireJS + domReady中的未捕获对象

我有一个工作的AngularJS应用程序,并开始使用RequireJS进行模块依赖.遵循本指南 - http://www.startersquad.com/blog/angularjs-requirejs/ - 使用domReady插件手动启动角度应用程序.

在Chrome中测试并进入Uncaught object控制台.没有角度通常提供的通常细节,只有无用的调用堆栈.

这是我的应用程序的一个非常简化的版本:

<html ng-app="myApp">
<body>
    <script data-main="/scripts/config.js" src="scripts/require.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

config.js:

requirejs.config({
    shim: { 'angular': { exports: 'angular' } },
    deps: ['starting']
});
define(['require', 'angular', 'app'], function (require, angular) {
    require(['domReady!'], function (document) {
        angular.bootstrap(document, ['myApp']);
    });
});
Run Code Online (Sandbox Code Playgroud)

app.js:

define(['angular'], function (angular) {
    var app = angular.module("myApp", []);
    return app;
});
Run Code Online (Sandbox Code Playgroud)

domready requirejs angularjs angular-bootstrap

3
推荐指数
1
解决办法
2411
查看次数

MEAN.JS和角度自举旋转木马不工作

我开始使用MEAN.JS并尝试在Angular Bootstrap示例页面上实现轮播示例.我使用命令yo meanjs创建了一个样板项目,并修改了home.client.view.html以删除jumbotron并将其替换为以下html(从ui bootstrap示例中复制)

<div ng-controller="MyCarouselController">
  <div style="height: 305px">
    <carousel interval="myInterval">
      <slide ng-repeat="slide in slides" active="slide.active">
        <img ng-src="{{slide.image}}" style="margin:auto;">
        <div class="carousel-caption">
          <h4>Slide {{$index}}</h4>
          <p>{{slide.text}}</p>
        </div>
      </slide>
    </carousel>
  </div>
  <div class="row">
    <div class="col-md-6">
      <button type="button" class="btn btn-info" ng-click="addSlide()">Add Slide</button>
    </div>
    <div class="col-md-6">
      Interval, in milliseconds: <input type="number" class="form-control" ng-model="myInterval">
      <br />Enter a negative number to stop the interval.
    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

我添加了一个名为MyCarouselController的控制器(文件名为carousel.client.controller.js)并从示例中添加了javascript

angular.module('core').controller('MyCarouselController', ['$scope', 'Authentication',
  function($scope, Authentication) {
    $scope.myInterval = 5000;
    var slides …
Run Code Online (Sandbox Code Playgroud)

javascript angularjs mean-stack angular-bootstrap

3
推荐指数
1
解决办法
1495
查看次数

在升级angular-bootstrap时缺少字体/ glyphicons-halflings-regular.*

我正在使用Yeoman和cg-angular生成器来构建一个角度应用程序.这最初工作正常,但我最近升级angular-bootstrap,从0.100.11获得关于模态大小的一个新功能的保持.执行此操作后,我注意到Chrome上的开发人员控制台中出现以下错误.

GET http://localhost:9001/fonts/glyphicons-halflings-regular.woff  angular-ui-router.js:3702 
GET http://localhost:9001/fonts/glyphicons-halflings-regular.ttf   :9001/fonts/glyphicons-halflings-regular.ttf:1
Run Code Online (Sandbox Code Playgroud)

我使用的版本3.1.1bootstrap.

如果我升级bootstrap到最新的那个3.3.4.然后我得到一些不同的错误:

GET http://fonts/glyphicons-halflings-regular.woff2 net::ERR_NAME_NOT_RESOLVED angular-animate.js:442
GET http://fonts/glyphicons-halflings-regular.woff  net::ERR_NAME_NOT_RESOLVED fonts/glyphicons-halflings-regular.woff:1
GET http://fonts/glyphicons-halflings-regular.ttf   net::ERR_NAME_NOT_RESOLVED fonts/glyphicons-halflings-regular.ttf:1
Run Code Online (Sandbox Code Playgroud)

我应该说我在本地运行时看到这些错误 grunt serve

此外,如果我升级boostrap,但保持angular-bootstrap0.10那时我没有这些问题.

我也有以下我的Gruntfile.js:

copy: {
        main: {
            files: [
                {src: ['bower_components/font-awesome/fonts/**'], dest: 'dist/', filter: 'isFile', expand: true},
                {src: ['bower_components/bootstrap/fonts/**'], dest: 'dist/', filter: 'isFile', expand: true}
            ]
        }
    }
Run Code Online (Sandbox Code Playgroud)

虽然,就像我说的那样,我在本地运行时看到这些丢失的字形,所以这个笨拙的任务不应该进入游戏.

我已经仔细研究了angular-bootstrap代码,令人困惑的是,代码中似乎没有直接引用glyphicon字体,因此升级此模块可能会导致这些错误有点奇怪.

升级时有没有其他人对glyphicons有任何问题angular-bootstrap

angularjs glyphicons angular-bootstrap

3
推荐指数
1
解决办法
6454
查看次数

垂直居中引导角模态窗口

无论显示内容的大小如何,我如何都可以将该模式窗口垂直居中。在我的页面中,我将图像显示为模式窗口,并且希望将其显示在屏幕中央。我可以水平对齐,但不能使其垂直协作。有什么想法/例子吗?

我在页面中遵循以下示例:模态窗口演示插件

但模态窗口的实际内容如下所示:

<script type="text/ng-template" id="myModalContent.html">
        <div>
             <img class= "attachmentImage" src={{items}} />
        </div>
</script>
Run Code Online (Sandbox Code Playgroud)

我应该寻找使的变化bootstrap.min.css或者ui-bootstrap-tpls-0.13.0.js或者是在我自己的表与我的风格接近这一目标的最佳途径。

非常感谢您的宝贵时间。如果您需要更多信息或不清楚,请告诉我。

css twitter-bootstrap angularjs bootstrap-modal angular-bootstrap

3
推荐指数
1
解决办法
2965
查看次数

如何禁用uib-timepicker箭头键?

即使在我使用它之后它仍然显示箭头

  <div uib-timepicker ng-model="mytime" arrowkeys="false" show-meridian="false"></div>
Run Code Online (Sandbox Code Playgroud)

以下是plunker:https://plnkr.co/edit/j5JlXWsoldsj0iEdSUMY ? p = preview

如何禁用它们?有谁知道?他们的文档说明可以隐藏箭头.这是一个错误吗?

Angular Bootstrap timepicker插件:链接

谢谢

angular-bootstrap

3
推荐指数
1
解决办法
2798
查看次数

根据模态控制器内部的逻辑,防止AngularJS模态关闭

有没有办法防止AngularJS模态在模态的控制器逻辑中关闭/解除?

我想要的是当用户关闭模态时显示警告,并且模态内的表单包含未保存的数据.

我已经尝试过搜索一个关闭之前的事件或者我可以在官方文档中使用的其他东西,但到目前为止还没有运气.

angularjs angular-ui angular-bootstrap

2
推荐指数
1
解决办法
6997
查看次数