angular-ui-bootstrap

What's a good way to control an angular-ui accordion programmatically?

这一生的挚爱 提交于 2019-12-20 10:32:38
问题 I am using the accordion directive from http://angular-ui.github.com/bootstrap/ and I need to have more control over when the accordions open and close. To be more precise I need a button inside the accordion-group that will close its parent accordion and open the next one (so basically mimic what clicking the next header would do if close-others was set to true). I also need to do some validation before I can allow an accordion to be closed and the next one to be opened, and I also need to

Stop propagation of underlying ng-click inside a jQuery click event

一个人想着一个人 提交于 2019-12-20 10:11:39
问题 A Twitter Bootstrap dropdown is nested inside a tr . The tr is clickable through ng-click . Clicking anywhere on the page will collapse the dropdown menu. That behavior is defined in a directive through $document.bind('click', closeMenu) . So, when menu is opened, and the user click on a row, I want the menu to close (as it does) AND I want to prevent the click event on the row. JSFiddle : http://jsfiddle.net/LMc2f/1/ JSFiddle + directive inline : http://jsfiddle.net/9DM8U/1/ Relevant code

Angular UI Bootstrap Popover - How add a close button

岁酱吖の 提交于 2019-12-20 10:06:55
问题 I've a table with a popover for every cell as in the follow example: the call to popover: <td ng-repeat="i in c.installments" ng-class="{ 'first' : i.first, 'last' : i.last, 'advance' : i.advance.value > 0, 'edited' : i.edited, 'final-installment' : i.last }" popover-trigger="{{ popoverFilter(i) }}" popover-placement="top" popover-title="{{i.id == 0 ? 'Advance' : 'Installment ' + i.id}}" popover-append-to-body="true" popover-template="popoverTemplate(i)" ng-init="payment= i; newpayment= i

Bootstrap alert message represented as modal, angular

柔情痞子 提交于 2019-12-20 09:46:20
问题 Bootstrap 3 provides Bootstrap: event messages : success, info, warning, danger . However sometimes the view doesn't have enough space to show up the event message. Is there easy way to wrap event with modal in Angular? This is a template I started to play with 回答1: I'll answer on my own question. Simple way The flow is pretty simple and straightforward. We don't reinvent the wheel here. We don't need nor header neither footer: Dialog template HTML: <div class="modal-body" style="padding:0px"

$modalInstance dialog box closes, but screen remains grayed out and inaccessible

China☆狼群 提交于 2019-12-19 18:24:05
问题 I am using angular-ui to open and close a modal. When I close it with submit(object) or dismiss(message) , the dialog box closes, but the screen remains grayed out and I can't access my app. Some code: The parent controller (relevant part): $scope.deleteConfirm = function(toDelete) { console.log(toDelete); var modalObj = { templateUrl: 'views/templates/delete.html', controller: 'DeleteCtrl', size: 'sm', resolve: { toDelete: function() { return toDelete; }, collection: function() { return

$modalInstance dialog box closes, but screen remains grayed out and inaccessible

我的梦境 提交于 2019-12-19 18:23:53
问题 I am using angular-ui to open and close a modal. When I close it with submit(object) or dismiss(message) , the dialog box closes, but the screen remains grayed out and I can't access my app. Some code: The parent controller (relevant part): $scope.deleteConfirm = function(toDelete) { console.log(toDelete); var modalObj = { templateUrl: 'views/templates/delete.html', controller: 'DeleteCtrl', size: 'sm', resolve: { toDelete: function() { return toDelete; }, collection: function() { return

AngularUI - Compatible browsers

↘锁芯ラ 提交于 2019-12-19 09:58:58
问题 I tried to open the AngularUI website (http://angular-ui.github.io/) in IE8. UI was not rendered properly in IE8(working fine in latest version of chrome/firefox). This led me to search browser compatability of AngularUI modules. A discussion in the groups pointed me that AngularUI-bootstrap module does not support IE8( https://groups.google.com/forum/#!topic/angular-ui/8L0739rxdes) But could find the info for other modules listed below. UI-Utils UI-Modules NG-Grid UI-Router So the question

Angular UI Modal 2 Way Binding Not Working

霸气de小男生 提交于 2019-12-19 05:32:18
问题 I am adding an Angular UI Modal where I am passing the scope through to the Modal Window for 2 way binding. I used the resolve method to pass the scope value. Doing so works sort of works meaning when the ng-model value changes in parent, it reflects inside the modal window. However, if the value changes inside the modal window, it is not reflecting in the parent ng-model. Here is my code: HTML: <div ng-app="app"> <div ng-controller="ParentController"> <br /> <input type="text" ng-model=

How to handle 'Possibly unhandled rejection: backdrop click' in a general way

空扰寡人 提交于 2019-12-19 05:05:11
问题 I have an angular service for handling modals: angular.module('myApp').service('ModalService', function($uibModal) { function open(options) { return $uibModal.open(options); } }); Now I upgraded to angular 1.6 and got this error: Possibly unhandled rejection: backdrop click whenever I open a modal and click somewhere else (the backdrop) and the modal closes (as intended). So I want to handle this unhandled exception in my ModalService as I do not want to handle this case everytime I use the

How to populate Angular UI Bootstrap Typeahead with newest $resource

跟風遠走 提交于 2019-12-19 03:08:32
问题 According to this Paweł Kozłowski's answer, Typeahead from AngularUI-Bootstrap should work when asynchronously obtaining popup items with $resource in newest Angular versions (I'm using 1.2.X). Plunk - Paweł's version - Typeahead with $http I guess I don't know how to use it properly (As a result I get an error in typeaheadHighlight directive's code - typeahead treats instantly returned Resource s as strings and tires to highlight them). Plunk - Typeahead with $resource I think the critical