angular-ui-bootstrap

How to set default format date with angular ui bootstrap

你说的曾经没有我的故事 提交于 2019-12-22 10:54:06
问题 I use ui.boostrap for a datepicker, http://plnkr.co/edit/GfOQmgW85U2aW3YbZO7T?p=preview I need to format the date like "yyyy/MM/dd" because that's how my RESTapi receives the args. Applying $filter in angular. http://docs.angularjs.org/api/ng.filter:date It seems that the problem was solved, however when I change the date in the datepicker, the format date changes to a format like 2014-01-30T00:58:43.000Z how can I set default format date with this tool? 回答1: Since the date is a JS Date

Opening the same dialog multiple times with $dialog

我怕爱的太早我们不能终老 提交于 2019-12-22 07:54:11
问题 I created this plnkr when answering this question 'AngularJS - open controller in a dialog (template loaded dynamically)'. All the example app does is launch a dialog box based on a template, with it's own controller. The first time the dialog launches, everything works as expected. However, if I try and re-launch the dialog, after dismissing it, the modal backdrop is shown but no dialog. In the javascript console you can see that the then method on the promise returned by $dialog.open() is

Angularjs UI bootstrap temporarily change URL on open and revert to original URL on close

空扰寡人 提交于 2019-12-22 07:12:09
问题 I want to temporarily change the browser url when the ui bootstrap modal is opened ( The page behind should remain as is, only the url changes ). When the modal is closed the url should be reverted back to the original one. Steps : User loads the page url : xyz.com/home User clicks a link opens a modal url : xyz.com/detail/123 possible solution : changing url with html5 push state problem : Angular ui-router tries to run its routes as per the changed url, eventually changing the background

Make an accordion with angularjs/ui-bootstrap an using the ng-model

妖精的绣舞 提交于 2019-12-22 06:18:10
问题 I use angularJs and bootstrap. I have made an accordion where I have put a select for choose the value of the filter and the data-ng-model which doesn't work (the select works if he is not in an accordion). Here is my code: <accordion close-others="oneAtATime"> <accordion-group is-open="isOpen"> <accordion-heading> Country<i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': isOpen, 'glyphicon-chevron-right': !isOpen}"></i> </accordion-heading> <select data-ng-model="country"

Many UI-Bootstrap-Datepickers on page loads very slowly - can I use a single instance and move element?

大憨熊 提交于 2019-12-22 05:45:15
问题 I have many rows displayed using 'ng-repeat'. Each row has 2 x UI-Bootstrap-Datepickers. When there are many rows, the loading of the page gets really slow. I would like to just use a single datepicker and then move it dynamically under the field that the user has clicked into, or possibly load the directive on click and unload it again after a selection has been made. Any ideas on how I can achieve this? <li ng-repeat="ticket in data.tickets"> <div ng-click="openAddStartCal($event, ticket)"

Dynamic Content in Dynamic Tab (Angular, UI Bootstrap)

狂风中的少年 提交于 2019-12-22 05:25:11
问题 I'd like to use ng-include in the content of a dynamically generated tab using AngularJs and UI Bootstrap. I have a Plunker here: http://plnkr.co/edit/2mpbovsu2eDrUdu8t7SM?p=preview <div id="mainCntr" style="padding: 20px;"> <uib-tabset> <uib-tab ng-repeat="tab in tabs" active="tab.active" disable="tab.disabled"> <uib-tab-heading> {{tab.title}} <i class="glyphicon glyphicon-remove-sign" ng-click="removeTab($index)"></i> </uib-tab-heading> {{tab.content}} </uib-tab> </uib-tabset> </div> JS

ui.bootstrap deforms the <progress> HTML tag

谁说胖子不能爱 提交于 2019-12-22 04:46:34
问题 In my HTML file I have a <progress> tag and I also injected the ui.bootstrap dependency to my controller as follows: var myApp = angular.module("myApp",["ui.bootstrap"]); In this configuration, AngularJS converts the <progress></progress> into: <div class="progress ng-isolate-scope" ng-transclude=""></div> When I remove "ui.bootstrap" it works fine. You can play out with this sample JSFiddle. When progress turned into <div class="progress ng-isolate-scope" ng-transclude=""></div> it

Error: [$injector:nomod] Module 'ui.bootstrap' is not available! while Karma run in webstorm

北慕城南 提交于 2019-12-22 04:43:12
问题 Hi I'm getting the following error in webstorm while running karma test run Error: [$injector:nomod] Module 'ui.bootstrap', 'ui.unique' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. i looked in the internet and they said to check dependency file ui.bootstrap might be missed like that. but the application works fine and while testing only it shows this error in my karma.conf

Failed to load template: uib/template/modal/window.html

↘锁芯ラ 提交于 2019-12-22 04:37:20
问题 I feel like i have attempted everything and i still get the error: Failed to load template: uib/template/modal/window.html in my index file i have added the following: <script src="node_modules/angular-ui-bootstrap/dist/ui-bootstrap.js"></script> <script src="node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script> in my app file ive added: 'ui.bootstrap', And in my controller file ive added the following: $uibModal and this.openPayment = function () { var modalInstance =

How to show popover that is hiding behind navbar

蓝咒 提交于 2019-12-22 04:33:16
问题 I am new to Bootstrap and Angular. In my webpage there is a button and i am providing a popover for a span like this <span popover="Download Project History" popover-trigger="mouseenter" tooltip-placement="top" style="padding: 5px" translate="DOWNLOAD">DOWNLOAD</span> But its getting hidden under navbar. Based on my googling i found to provide data-container="body" in the html element. But its not working too. Can anyone please help me? Thanks 回答1: I had a similar problem where the popover