angular-ui

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

Form Validation with Dependent Fields in AngularJS

ぃ、小莉子 提交于 2019-12-19 07:24:40
问题 I have an object that has 2 fields, while 1 should be less than or equal to another. Say it's HDD quota settings and I need the threshold to be less than or equal to HDD's size . I am trying to use angular's ui-utils#validate. This is how I got so far: http://embed.plnkr.co/EysaRdu2vuuyXAXJcJmE/preview (i hope the link will work) The problem that I am having is that it works to one direction: Setting size and then playing with threshold works ok But if I try to change size , after threshold

Angular UI modal with Bootstrap 4

懵懂的女人 提交于 2019-12-19 05:23:55
问题 Bootstrap 3 modal works fine: https://jsfiddle.net/qLy7gk3f/4/ But Bootstrap 4 modal doesn't: https://jsfiddle.net/qLy7gk3f/3/ The code is identical: $scope.click = function() { $uibModal.open({ templateUrl: "modal.html", controller: "modal", scope: $scope }); } How can I get AngularUI modals to work with Bootstrap 4? 回答1: I think it's just a case of adding the .in classes, specifically: .fade.in { opacity: 1; } .modal.in .modal-dialog { -webkit-transform: translate(0, 0); -o-transform:

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

Value is not binding with scope's variable if used inside uib-tabset

人盡茶涼 提交于 2019-12-18 21:14:09
问题 Value is not binding with scope's variable if used inside uib-tabset. Here in following example I tried to get $scope.message inside uib-tab and outside of it : angular.module("app", ["ui.bootstrap"]) .controller("myctrlr", ["$scope", function($scope){ $scope.message = "my message "; }]); <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <script src

How inject $stateProvider in angular application?

北慕城南 提交于 2019-12-18 14:54:58
问题 I try to use angular-ui, and try to inject $stateProvider: html <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular-resource.min.js"></script> <script src="http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js"></script> <script src="test/appModule.js"></script> </head> <body> <div ng-app="appModule"> <div ng-controller=

angular-ui modal with controller as syntax

对着背影说爱祢 提交于 2019-12-18 14:00:08
问题 I'm using angular-ui-bootstrap-bower#0.7.0 with angular#1.2.10 and when opening a modal where the controller is an "old fashioned" one, everything works fine. However, when I have a controller meant to use with the new "controller as syntax" it doesn't work. Does angular-ui-bootstrap modal work with controller as syntax? Does version 0.7 support it? How to do it? 回答1: You can use the ngController syntax for the "controller" option. For example: controller: 'modalController as modal' There is

How to see what states are configured in AngularJS / UI-Router?

被刻印的时光 ゝ 提交于 2019-12-18 13:52:28
问题 Is there a way to see all of the states that have been set on $stateProvider ? In this case, I would like my state assignments to be distributed across many files. I would like to inspect the built states on run or config in a different file. For example: # component1.coffee angular.module('zoo').config ($stateProvider) -> $stateProvider.state 'component1', url: '/component1' template: _template controller: 'Component1Ctrl' # component2.coffee angular.module('zoo').config ($stateProvider) ->

AngularJS/UI Bootstrap - fading out alert on remove

ⅰ亾dé卋堺 提交于 2019-12-18 13:19:52
问题 I am using Angular with UI Bootstrap. I've created the custom directive that pushes broadcasted alerst into the array of alerts that are bound to the view (rendered as Bootstrap alerts). After the certain timeout the alerts get removed from the array (and hence from the view). Here is the code: angular.module('myApp') .directive('alerts', function ($timeout) { return { restrict: 'E', templateUrl: 'views/alerts.html', scope: true, /*share scope between alerts directives*/ link: function (scope