angular-ui

AngularUI sortable does not work for more then one applications

独自空忆成欢 提交于 2019-12-12 20:23:41
问题 I have created angularjs application with sortable list. My application can be included to the page few times with other different applications. (Each of this angular applications is isolated user control) var myapp = angular.module('myapp', ['ui']); myapp.controller('controller', function ($scope) { $scope.list1 = ["1", "2", "3"]; }); angular.bootstrap($("#app1"), ['myapp']); angular.bootstrap($("#app2"), ['myapp']); http://jsfiddle.net/X2h8W/ For this case ui-sortable works only for last

Saved password in Firefox send empty fields

空扰寡人 提交于 2019-12-12 18:23:43
问题 I have a problem with the browsers credentials saving. The first time that I login with my app, the browser ask me to save the fields, I press ok, but when I login the second time and the browser fullfill the form fields with the saved credentials, I press login, and the browser send a request without parameters. HTML <div ng-controller="modalCtrl"> <script type="text/ng-template" id="login"> <form ng-submit="login()" class="login"> <input type="text" ng-model="data.username" placeholder=

UI-Router multiple named views not working

荒凉一梦 提交于 2019-12-12 17:23:51
问题 I try to use the multiple named view of UI-Router but it's not working. See following example to understand my problem : start.html <body ng-app="startApp"> <div ui-view="navigation"></div> <div ui-view="content"></div> </body> nav.html <nav> <ul> <li>btn1</li> <li>btn2</li> </ul> </nav> content.html <h1>My content</h1> app.js angular.module('startApp', ['ngAnimate', 'ui.router', 'ngFileUpload', 'ngImgCrop']) .config(function ($stateProvider, $urlRouterProvider) { $stateProvider .state('start

cannot navigate angular-ui boostrap typeahead with specific height with keyboard

戏子无情 提交于 2019-12-12 14:17:44
问题 So, I think it's more a bootsrap issue than angular-ui, but I spent 2 nights over this and I cannot find the light at the end of the tunnel. Here's the plunkr : http://plnkr.co/edit/n39LVjbHQzmcwGkk2dR1?p=preview Search for "x" and then try to go down using the arrow keys. Items will be selected, but they will not gain focus. Any ideas? 回答1: Here is a solution. I added another directive to the typeahead li element shouldFocus that watches for its active value to change. When it does it calls

Check for 401 then redirect Angularjs but only on certain routes

£可爱£侵袭症+ 提交于 2019-12-12 14:10:17
问题 I've got a nice angular service that checks to see if a user is logged in by looking to see if the server returns a 401 error message. If it does, the user is redirected to a login page. This works well, but the issue is that its completely global for all of my pages. I have a special route that resides at /explore (using UI-router btw) that I want to ignore any 401s and show the page anyway without redirecting to the login page. How would I go about making this exception for /explore ? My

change slotDuration of fullCalendar

我们两清 提交于 2019-12-12 13:27:26
问题 I'm using ui-calendar (witch is based on fullCalendar), and default slot duration = '00:30:00'. I want change it to '00:15:00'. My config object: /* config object */ $scope.uiConfig = { calendar:{ height: 450, editable: true, duration: '00:15:00', slotDuration: '00:15:00', header:{ left: 'title', center: '', right: 'today prev,next' }, eventClick: $scope.alertOnEventClick, eventDrop: $scope.alertOnDrop, eventResize: $scope.alertOnResize } }; According to http://fullcalendar.io/docs/agenda

How to close an Angular-ui-bootstrap uibModal on mouseleave using Factory?

99封情书 提交于 2019-12-12 13:18:56
问题 I've recently switched all our modals directives in our app over to Angular-ui-Bootstrap modals. Much better, however running into a new style of modal which closes on mouseleave instead of a cancel click. this.leaveTag = (tag) => { TagHover.off(); }; this.hoverTag = (tag) => { TagHover.display(); }; Above is the view logic that calls functions inside of our TagHover Factory. Below is the Factory, the TagHover.display works fine like with our other modals, but what I'm trying to do with the

Angular UI mask empty placeholder

旧街凉风 提交于 2019-12-12 12:58:32
问题 I am using angular ui mask directive for a date field and its adding underscores for the placeholder. Is there a way to show nothing on the placeholder? 回答1: Regarding that is a plugin issue I found this amazing library called ngMask: https://github.com/candreoliveira/ngMask 回答2: Please try this once. <div ng-app="myApp"> <input class="form-control" type="text" ng-model="accountNumber" ui-mask="9999 9999 9999 9999 999" ui-mask-placeholder-char="space" /> </div> Using ui-mask-placeholder-char=

angular-bootstrap accordion databinding issue

那年仲夏 提交于 2019-12-12 11:35:23
问题 I have 2 drop downs with same models, one inside accordion and another outside. The outside drop down works fine in terms of 2-way databinding but the one inside the accordion seems to have only 1-way binding, in other words selecting in the UI is not setting the model value. I found a suggestion here that using ng-change will fix this problem. It fixed for <textarea> but not for <select> . Wondering this could be bug in angular-ui. Can someone help on this issue. Thanks in advance! outside

How can I make by default accordion to make open first element?

混江龙づ霸主 提交于 2019-12-12 11:16:12
问题 I use bootstrap accordion in my project. Here is working fiddler . Here is HTML code: <div ng-app="myapp"> <div ng-controller="AccordionDemoCtrl"> <uib-accordion close-others="oneAtATime"> <uib-accordion-group ng-repeat="group in groups" is-open="isOpen"> <uib-accordion-heading> <div class="text-center"> <strong>{{group.title}}</strong> <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': isOpen, 'glyphicon-chevron-right': !isOpen}"></i> </div> </uib-accordion-heading> {{group