Tag: angular ui

如何用Angular.js实现分页/表格布局?

比方说,我收到了15+对象的对象文字,我需要在一个不错的布局(不是所有的行)中显示它们,什么是最有效的方法来控制行应该打破/页面应该结束? 现在我在表行上使用了ng-repeat,结果是一列很长的一列。 编辑澄清。 可以有对象内的对象/更多的参数。 这是我的目标: $scope.zones = [ {"name": "Zone 1", "activity": "1"}, {"name": "Zone 2", "activity": "1"}, {"name": "Zone 3", "activity": "0"}, {"name": "Zone 4", "activity": "0"}, {"name": "Zone 5", "activity": "0"}, {"name": "Zone 6", "activity": "0"}, {"name": "Zone 7", "activity": "1"}, {"name": "Zone 8", "activity": "0"}, {"name": "Zone 9", "activity": "0"}, {"name": "Zone […]

ui.bootstrap.datepicker is-open无法在模态中工作

我使用Bootstrap UI的datepicker指令,我试图有一个datepickerbutton,像在原来的例子中打开datepickerpopup,但它不能在模式窗口中工作。 参见PLUNKER 我究竟做错了什么?

我应该使用Angular UI Bootstrap还是纯Bootstrap 3?

在编写的时候Angular UI Bootstrap基于Twitter Bootstrap 2,而最新版本是Bootstrap 3.如果我要在Angular.js中编写应用程序,我应该使用什么UI框架? Angular UI还是只是普通的Bootstrap? 那里有什么优点和缺点? 无论是长期还是短期。

closures事件后的angular度用户界面模式

有一种方法可以在模态窗口被调用后调用函数(不pipe它是否发生在button上或点击背景) var dialog, options; options = { windowClass: "lightBox" templateUrl: "url to the template", controller: "some random controller", scope: $scope }); $("body").css({ 'overflow': 'hidden' }); dialog = $modal.open(options); dialog.result.then(function() { $("body").css({ 'overflow': 'auto' }); }); 我希望每次模态窗口都closures结果中的函数,然后执行。 现在只需执行手动closures模态我的$ modalInstance.close()。 但是,如果我点击背景此方法不会被调用 任何想法如何我可以做到这一点?

如何从任何地方closuresAngular UI Modal

我正在使用Angular UI引导模式对话框并在服务中创build它: myApp.factory('ModalService', ['$modal', function($modal) { return { trigger: function(template) { $modal.open({ templateUrl: template, size: 'lg', controller: function($scope, $modalInstance) { $scope.ok = function() { $modalInstance.close($scope.selected.item); }; $scope.cancel = function() { $modalInstance.dismiss('cancel'); }; } }); }, close: function() { // this should close all modal instances } }; }]); 如何从控制器调用ModalService.close()时closures所有的模态实例?

如何在AngularJS中使用HTTPS

我使用的是Angularjs $ resource&$ http和apis,但是由于安全原因我需要调用HTTPS请求(在HTTPS协议下工作)。 什么是在angularjs中使用https的方式。 感谢你的答案。

Datepicker不会在angular-ui版本0.11.0中打开两次

我想要有2个dateselect器,我正在使用Angular UI版本0.11.0。 我的HTML代码 <span ng-if="periods.period == 10"> <input type="text" datepicker-popup="dd-MMMM-yyyy" ng-model="cdate.customStartDate" is-open="opened1" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" class="input-md" /> <button class="btn" ng-click="open($event,'opened1')"><span class="glyphicon glyphicon-calendar"></span></button> </span> <span ng-if="periods.period == 10"> – <input type="text" datepicker-popup="dd-MMMM-yyyy" ng-model="cdate.customEndDate" is-open="opened2" min-date="cdate.customStartDate" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" class="input-md" /> <button class="btn" ng-click="open($event,'opened2')"><span class="glyphicon glyphicon-calendar"></span></button> </span> 和我的JS代码是` $scope.disabled = function(date, […]

使用angular / bootstrap的<select>占位符不起作用

我想有一个select与angularjs中的占位符引导。 我find的解决scheme不适用于angular度 这是我的angular度标记: <select ng-model="myModel" ng-options="p.name for p in …" class="form-control list-selector required"> <option value='' disabled selected>Please Choose</option> </select> 如果有人有一个工作解决scheme… 谢谢 :)

angularjs文本区字符计数器

嗨,我有一个文字区域characeter计数器。 我的问题是,它不包括空格或换行符。 我该如何做到这一点? <div class="controls"> <textarea rows="4" cols="50" maxlength="1500" data-ng-minLength="1" data-ng model="createprofilefields.description" required highlight-on- error></textarea> <br /> <!–counter–> <span class="form-help">{{1500-createprofilefields.description.length}} Characters</span> </div>

angularjs:防止Bootstrap莫代尔消失,当点击外面或按逃生?

我使用angular引导来呈现一个模态。 但是我的要求是防止在模式外单击或按下退出键时popup解除。 我遵循angular度bootstrap网站上的教程: http : //angular-ui.github.io/bootstrap/