标签: angular-ui-bootstrap

禁用Angularjs日期选择器中的特定日期

我想在日期选择器中禁用特定日期AngularJS.

我正在使用AngularJS-bootstrapcss作为组件.

我要禁用的日期将根据组合中先前值的选择动态更改.

我相信date-disabled="disabled(date, mode)"应该工作,但不确定.

我怎样才能做到这一点 ?

javascript angularjs angular-ui-bootstrap

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

typeahead angular ui - 无法读取undefined属性'length'

我在我的应用程序中使用Angular-ui Bootstrap.我使用typeahead指令.

HTML:

<input type="text" class="pass_code_input" ng-model="SuppPrefix" Typeahead="ddl_item.Text for ddl_item in getData($viewValue)"/>
Run Code Online (Sandbox Code Playgroud)

调节器

function AutoCompleteCtrl($scope,$http, AutoCompleteSrv) {
    $scope.getData = function (prefix) {
        AutoCompleteSrv.GetAutoComplete("Supplier", prefix).then(function (result) {
            var results_arr = [];
            angular.forEach(result.data, function (item) {
                results_arr.push({ "Val": item.Val, "Text": item.Text });
            });
            return results_arr
        });  
    };
};
Run Code Online (Sandbox Code Playgroud)

服务:

    function AutoCompleteSrv($http) {
    var _$http = $http;
    self = this;
    self.GetAutoComplete = function (DataType, Prefix) {
        var promise = _$http({
            method: "GET",
            url: 'api/AutoComplete',
            params: { 'DataType': DataType, 'Prefix': Prefix }
        }).success(function …
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui angular-ui-bootstrap

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

基于AngularJS的UI组件,quantumui与angular-strap vs. angular-bootstrap-ui

我一直在寻找一个基于AngularJS的启动项目的组件集.

经过一些研究,我发现了三个可以适用的常见组件集.

第一个是AngularJS Bootstrap UI.看起来很清楚,但没有足够的示例和文档.

第二个是角带.我已经看到它是一个带有一些附加功能的bootstrap.js的简单实现,但它看起来很简单.

最后一个是QuantumUI.我看到它很神奇,但它看起来很新.

这些框架的经验是什么?你能列出他们的优点吗?

angularjs angular-ui angular-ui-bootstrap angular-strap

7
推荐指数
1
解决办法
4878
查看次数

如何将不可点击的内容添加到角度引导手风琴标题?

手风琴标题中的默认内容将全部可点击以切换该部分,但现在我需要在标题中添加其他不可点击的内容.怎么办?

<accordion-group is-open="OpenOneAtTime" ng-repeat="destination in mileage.destionations" style='position:relative;'>
    <accordion-heading>
        <!-- All I want is only make "Toggle Me" clickable, and leave other content in the header alone,just like pure text. -->
        <span ng-class="{'fa-chevron-down': OpenOneAtTime, 'fa-chevron-right': !OpenOneAtTime}">Toggle Me</span>
        <span ng-show='!OpenOneAtTime'>{{destination.Total}}+{{destination.To}}</span>
    </accordion-heading>
    <div class='accordion-section'>
        main content
    </div>
    <div class='clear'></div>
</accordion-group>
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui-bootstrap

7
推荐指数
1
解决办法
1202
查看次数

Angular JS UI Bootstrap选项卡(ui.bootstrap.tabs)使页面在select上滚动/跳转

选择选项卡会导致页面随机滚动,例如选择选项卡可以将页面几乎一直滚动到顶部,然后我必须向下滚动才能看到选项卡的内容,如果我选择另一个选项卡页面再次滚动.

标签的内容大小可变,有些元素比其他元素多,所以它们自然具有不同的高度,但我不确定这是否是随机页面滚动的原因.

我尝试了一些jquery来禁用链接默认操作而没有运气.

$(function () {
   $('body').on('click', 'a[ng-click="select()"]', function (event) {
      event.preventDefault();
   });
});
Run Code Online (Sandbox Code Playgroud)

另一个丑陋的解决方案是我将tabset包装在div中并在div上设置一个高度

<div class="col-md-12" id="profile-nav-tabs" style="
         height:500px;
         overflow-y: auto;
         overflow-x:hidden
         ">
        <tabset justified="true">
            <tab  heading="{{::strings.profile}}">
                <br />
                <div  ng-include="'tab-profile.php'"></div>
            </tab>
            .... more tabs
       </tabset>
</div>
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui-bootstrap twitter-bootstrap-3

7
推荐指数
1
解决办法
959
查看次数

Angular UI Bootstrap什么都不做(没有错误,没有工作)

我正在尝试使用Angular UI Bootstrap:

我做了以下事情:

  • 用凉亭安装: bower install angular-bootstrap
  • 将其包含在js中: var myapp = angular.module('myApp', [ 'ui.bootstrap' ]);
  • 添加样式: .nav, .pagination, .carousel, .panel-title a { cursor: pointer; }

包含Bootstrap 3 CSS,angular.element.fn.jquery返回"2.1.4",因此不应使用jqlite.

当我添加例如:

<a href="#" tooltip-placement="left" uib-tooltip="On the Left!">Whatever</a>
Run Code Online (Sandbox Code Playgroud)

对我的模板,没有任何反应.当我添加其他bootstrap ui示例时,它也没有做任何事情.没有javascript错误.我的angular.js版本是1.4.1.

我还能做错什么呢?我必须对我的控制器做些什么吗?

angular-ui-bootstrap

7
推荐指数
1
解决办法
4362
查看次数

Bootstrap的Datepicker角度指令未显示

在我的Angular项目中,我试图将Angular指令用于bootstrap datepicker,但它没有显示出来.

我已链接到<script src="bower_components/angular-bootstrap/ui-bootstrap.js"></script>和 <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>我的index.html和我的app.js我已经把ui.bootstrap作为一个依赖.

angular
    .module('myApp', ['ui.bootstrap'])
Run Code Online (Sandbox Code Playgroud)

我有什么明显的遗失吗?

我试图uib-datepicker-popup在ng-repeat中的ng-switch中使用,但我不明白为什么会导致任何问题:

<div class="form-group" ng-repeat="field in vm.fields">
    <label for="{{ field.propertyName }}">
        <h5><span translate="{{ field.translate }}"></span>
            <span class="form-control-required" ng-show="{{field.required}}">*</span>
        </h5>
    </label>
    <div ng-switch="field.type" ng-class="{ 'input-group': field.type === 'date' }">
        <select ng-switch-when="gender"
                name="{{ field.propertyName }}" id="{{ field.propertyName }}"
                ng-model="vm.model[field.propertyName]" class="form-control"
                ng-required="{{ field.required }}">
            <option value="m">Male</option>
            <option value="f">Female</option>
        </select>
        <textarea ng-switch-when="textarea"
                  name="{{ field.propertyName }}" id="{{ field.propertyName }}"
                  class="form-control" ng-model="vm.model[field.propertyName]"
                  ng-required="{{ field.required }}"></textarea> …
Run Code Online (Sandbox Code Playgroud)

datepicker twitter-bootstrap angularjs angular-ui-bootstrap

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

AngularJS和UI-Bootstrap选项卡,使用ng-class修改选项卡

我正在使用ui-tabs在一个项目上使用AngularJS和UI-Bootstrap.

粗略的布局是这样的:

<uib-tabset>
    <uib-tab ng-repeat="tab in tabs" heading="{{tab.TAB_NAME}} : {{tab.Questions|sumByKey:'count'}} of {{tab.Questions.length}}" active="tab.active" disable="tab.disabled">

    <!-- Repeated Content -->

    </uib-tab>
</uib-tabset>
Run Code Online (Sandbox Code Playgroud)

sumByKey:'count'是一个过滤器,用于计算重复选项卡对象中'count'字段的总和.这将跟踪已回答的问题,tab.Questions.length计算选项卡中重复的问题数.

我可以在选项卡名称中显示这两个,因为我在这里工作,这是有效的,因此在每个选项卡中,选项卡名称是名称:问题 - 回答总问题,即:'停车:1的5'.

我想要做的是当这些数字相等时,使用ng-class将"已完成"类添加到选项卡,并且该选项卡中的所有问题都已得到解答.

我可以在选项卡中添加一个class ='complete',这样可行,但尝试使用ng-class根本不起作用,甚至ng-class ="complete".

有没有办法做到这一点?ng-class可以和uib-tabs一起使用吗?是否有其他机制来评估表达式并修改选项卡上的类?

angularjs angular-ui-bootstrap

7
推荐指数
1
解决办法
7313
查看次数

如何在禁用按钮上显示ui-boostrap工具提示?

在这里发帖之前,我找啊找,我发现了几个解决方案,应用工具提示禁用的按钮,反正这些都不是用uib-tooltip从角UI引导.

这是我按钮的代码:

<button class="btn btn-default"
        uib-tooltip="My tooltip text"
        tooltip-append-to-body="true"
        ng-disabled="!isAllSelected"
        ng-click="doThat()">Click Here
</button>
Run Code Online (Sandbox Code Playgroud)

你是否知道即使按钮被禁用,如何使工具提示可显示?

tooltip disabled-input angularjs angular-ui-bootstrap twitter-bootstrap-3

7
推荐指数
2
解决办法
3851
查看次数

带有溢出的模式中的 ui-select 下拉菜单

我目前面临着在 ui 引导模式中显示 ui-select 下拉菜单的问题,该模式应用了溢出 css。

目前,当打开 ui-select 下拉列表时,选项列表会在模态中打开,并被overflow-y:scroll;应用于模态主体的样式部分隐藏。

我想找到一种解决方案,使下拉菜单位于模态溢出之外,并且可以与模态的边缘重叠,就像模态没有应用溢出时一样。

以下 plunker 演示了我面临的问题。模式中的溢出切换按钮将在应用/不应用溢出之间切换,以演示问题和所需的结果。

https://plnkr.co/edit/7eZ7GuPFMiEFMT2hogMV?p=preview

overflow-y: scroll在这种情况下,模态体是必需的。模态页眉和页脚必须在页面上可见而无需滚动。将溢出添加到模态主体以仅将滚动应用于此区域,从而允许将信息添加到此区域,而无需增加页面底部下方的模态高度。用户可以动态编辑 modal-body 中显示的数据,这可以向 modal 添加额外的数据行,每行数据都可以包含 ui-select 元素。

css overflow angularjs angular-ui-bootstrap angular-ui-select

7
推荐指数
1
解决办法
6062
查看次数