angular-ui-bootstrap

Angular directive fields not require brackets

独自空忆成欢 提交于 2019-12-11 23:05:26
问题 I'm using UI Bootstrap's datepicker function and I'd like to get ahold of one of the values passed into an attribute. // JS $scope.myMaxDate = new Date(); <!-- HTML --> <input datepicker-popup="MM/dd/yyyy" max-date="myMaxDate" /> I don't understand why in this case the max-date attr takes a string rather than an expression like {{myMaxDate}} . How is it getting a hold of the actual value? What's more, I'm using a decorator to alter some data from this directive and would like to access this

How to add dynamic contents to tab set using angular and UI bootstrap

家住魔仙堡 提交于 2019-12-11 19:56:45
问题 Very new to angular and ui bootstrap. I have a tab set as below: <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title> Tabs</title> <link href="css/bootstrap.css" rel="stylesheet"> </head> <body> <form id="formTabs" runat="server"> <div> <div ng-controller="TabsDemoCtrl"> <hr /> <tabset align="left"> <tab heading="Account">Account content</tab> <tab heading="Policy">Policy content</tab> <tab heading="LoB">LOB content</tab> <tab heading="Coverage">Coverage content</tab> <tab

How to use img ng-src in AngularJS on android phone?

梦想的初衷 提交于 2019-12-11 19:48:19
问题 The most relevant Q & A I've found is from google groups and I've read the AngularJS docs for ngSrc. I'm trying to use Angular UI Bootstrap - Carousel in my app and I noticed the demo uses absolute URLs for slides like this: image: 'http://placekitten.com/' + newWidth + '/300' . It works on my localhost (mac) but I don't think images (slides) display on my android google nexus phone because I only use relative image paths like this: image: '/images/help/hello-1.jpg' . How can I use relative

bootstrap tabs does not work with angular ui router

廉价感情. 提交于 2019-12-11 15:24:43
问题 Thats the plunker as repro: http://plnkr.co/edit/aAsEiedQSrmIhL6KtGVL?p=preview The projects tab content is initially not visible. Only when I explicitly click on the projects tab its content gets visible. With the ui-sref="{{t.route}}" the edit/create state activation/rendering works. Using the original select="go(t.route)" the initial selection of the project tab works but the activation of the edit/create state fails. Weird things happen when you debug the code. How can I fix that buggy

Asynchronous request on bootstrap AngularJS uib-typeahead

老子叫甜甜 提交于 2019-12-11 15:16:33
问题 I am trying to search on the server side a name entered by the user, and give suggestions using bootstrap 3 uib-typeahead, however (although I hard coded the values to return - for testing purposes), no value is returning to the typeahead dropdown. My guess is that since this is an async request, any data is already returned by the time the request data is retrieved. Is there any way how data could be retrieved from server side, whilst typeahead is listening? $scope.test_search = function

How to pass variable to Angular UI Bootstrap Datepicker custom class

自作多情 提交于 2019-12-11 14:48:35
问题 I'm trying to pass a two-way data binded variable to Angular-UI-Bootstrap Datepicker customClass. But the data binding doesn't work inside my customClass function, it just gives me the value I initialized chosenUser variable with. Example: I load the site and getDayClass gets called with data initialized in chosenUser (undefined in this case) I choose an user from the site and the two-way data bind works correctly everywhere else but in getDayClass function So in getDayClass chosenUser is

tabset prevents table update

亡梦爱人 提交于 2019-12-11 14:34:44
问题 I have a working table with a filter: http://plnkr.co/edit/WnV7OUplcLHVOKbeTrSw?p=preview After wrapping it in a tabset it stops working (the filter is still updated): http://plnkr.co/edit/8uw2UhSC59txms5X563L?p=preview But it worked with old versions before I updated: http://plnkr.co/edit/eJvYtpc3efkydsQy8caL?p=preview (angular 1.0.8 + bootstrap 2.0.3 + angular-ui-bootstrap-0.6.0) Why did it stop working after the update? 回答1: http://plnkr.co/edit/70sLuA4gltgxhwTE0XT1 HTML (Just modified the

Angular UI Bootstrap Responsive menu - closing menu when clicking off it?

喜欢而已 提交于 2019-12-11 14:28:48
问题 I've successfully created a responsive menu using Angular UI Bootstrap. The problem is: When the responsive menu is open it can only be closed by re-clicking the toggle. Clicking anywhere else on the page keeps the menu open, which is undesirable for the site I'm building. I'm looking for this functionality: Clicking anywhere except the menu should close the menu, not toggle it. How would one go about achieving this? I tried setting an ng-click on the html or body elements and seeing if that

Wrapping angular typeAhead in separate directive

萝らか妹 提交于 2019-12-11 13:29:28
问题 My goal was to wrap angular-ui typeAhead directive into easily re-usable component, that could be used like this: <input my-person-lookup="myModel.personId" ></input> I've achieve this by writing my custom directive, and specifying static template for typeahead. Here is Plunker Now, I would like to build this template dynamically, and then compile it: var html = '<input type="text" ng-model="directiveModel.selectedPerson" typeahead=" p as p.name for p in people" typeahead-min-length="1"

Open angular-ui-bootstrap accordion based on ID

冷暖自知 提交于 2019-12-11 13:05:51
问题 I have an accordion: <accordion> <accordion-group ng-repeat="group in groups" heading="{{group.title}}" id="{{group.id}}" is-open="group.open"> <table class="table"> <tr> <td>{{group.definition}}</td> </tr> </table> </accordion-group> </accordion> and each accordion has a unique ID. I know how to open an accordion based on its position: <button ng-click="groups[0].open = !groups[0].open">Toggle Title 1 based on index</button> but how do I open an accordion based on its ID? My current attempt