angular-ui-bootstrap

How to retain the last opened accordion in a group by invoking function in is-open attribute

眉间皱痕 提交于 2019-12-13 06:53:20
问题 I'm having accordion which is populated dynamically. <accordion-group ng-repeat="data in dataList" is-open="isAccordionOpen(data.dataName)"> <accordion-heading> <span ng-click="openedAccordionGroup(data.dataName)" class="accordionSpan"><b>{{data.dataName}}</b> </span> </accordion-heading> </accordion-group> Here dataList keep on changing after 15 sec that means I'm populate dataList after regular inteval of 15sec. So i need to persist the last opened accordion group. DataList can be very hude

AngularJS UI Bootstrap “btn-radio” directive doesn't work

一笑奈何 提交于 2019-12-13 04:32:29
问题 Live Demo Could anyone explain why the first two button groups work, but the third one doesn't? <div class="btn-group"> <button ng-repeat="company in companies" class="btn" ng-model="radioModel.id" btn-radio="company.id"> {{company.name}} </button> </div> <div class="btn-group"> <button class="btn btn-two" ng-model="radioModel.id" btn-radio="2"> two </button> <button class="btn btn-two" ng-model="radioModel.id" btn-radio="3"> three </button> </div> <div class="btn-group"> <button ng-repeat=

Angularjs custom directive child scope access parent scope method?

元气小坏坏 提交于 2019-12-13 04:30:33
问题 I am trying to create a carousel with AngularJS ans UI Bootstrap. Since the carousel in UI bootstrap only supports images, I wan to write my own directive to support youtube video. I want the video to start to play when the video slide is active, and pause when the slide is not active. Also I would like to pause the carousel lopping when the video is playing. So far i have done the first part but can't pause the carousel because i can't access the pause method of the carousel scope. My code:

Angular UI date-picker min Date is not working

可紊 提交于 2019-12-13 02:06:46
问题 I am using angular 1.0.8. I want to use angular ui datepicker. I want to set minimum date to yesterday. I had tried min-date option like "min-date='-1d'" but it's not working. Does anyone have this issue? I need help in setting min-date option. Thanks and regards, Jay Patel 回答1: I am using angular.ui 0.10.0 version and it's having "min" instead of "min-date". I changed "min-date" to "min" as per comment and it's working properly 回答2: In your Controller you can write ,Use the latest version of

display binary image from db to angular partial view

ⅰ亾dé卋堺 提交于 2019-12-13 01:54:00
问题 I was trying to display image which is coming within the json object returning from an web api request. I'm able to display string, number and date/time in my angular partial but couldn't get the image displaying. here is my json object which contains each field of my topic (model) class <Topic> <Body>dsadfsaadsfds</Body> <Created>2014-06-15T00:00:00</Created> <Flagged>false</Flagged> <Id>1022</Id> <PhotoFile>

Doing animation with ng-show without ngAnimate

旧城冷巷雨未停 提交于 2019-12-13 01:26:53
问题 I want to do a wipe-in animation for my ng-show. Basically, I want to achieve this simple animation as shown in plunkr here. I know that ngShow has a hook for ng-animate since angular 1.3. However, the situation is a bit complicated. I have a carousel that I extend using angular UI Carousel bootstrap. The bootstrap has a bug with Chrome, so ngAnimate needs to be disabled for all elements under the carousel tag. I need animation for element under my carousel, but if I include ngAnimate, my

Angular ui bootstrap current date (today) highlight without selecting

喜欢而已 提交于 2019-12-13 00:37:05
问题 I am using Angular.UI Bootstrap Datepicker (http://angular-ui.github.io/bootstrap/#/datepicker) Now I am challenging one problem: the client always wants to see current date highlighted, even if it is not selected. Just like in this example (http://angular-ui.github.io/ui-date/). Tried to google this problem, but no solution found for Angular.UI Bootstrap Datepicker. There is no way, to switch to ui-date. Any ideas? Thank you! 回答1: Replace in the datepicker control this var days = getDates

Angular directive to dynamically set attribute(s) on existing DOM elements

孤者浪人 提交于 2019-12-13 00:11:02
问题 I'm somewhat new to Angular, so feedback on alternative approaches is certainly welcome. I have created a directive called "serverMaxLengths". When the directive is placed on an ng-form, it will fetch database fields lengths from a REST API and then will walk the contents of all input elements contained within the form controller, and will set the "maxlength" attribute accordingly. The directive is as follows: myApp.directive('serverMaxLengths', function ($log,$http,$compile) { return {

Adding Ajax loader in angular ui bootstrap modal

回眸只為那壹抹淺笑 提交于 2019-12-12 21:41:10
问题 I have ui bootstrap modal to play videos, these videos are taking time to load so i want to show ajax loader until videos get loaded. here is my ng-template and angular js code for modal, I have added ajax loader but i am not getting how to stop its loading. I want to stop its loading when videos are completely loaded. thanks <script type="text/ng-template" id="video_gallery.html"> <div class="modal-content col-md-12" > <div class="modal-header"> <h4 class="modal-title" style="text-align

Angular-UI datepicker doesn't work within a directive with isolate scope

独自空忆成欢 提交于 2019-12-12 15:58:56
问题 I have an issue that I believe is related to the isolate scope of my directive. The Angular-UI popup date picker will not appear again in the directive once a date has been selected from the popup. Outside the directive, the pop up continues to function correctly even when a date has been selected. For demonstration purposes, I've used the exact same markup and property for displaying the popup so that the two will influence each other. The same [broken] behaviour in the blob directive can be