angular-ui

Attach click event for the weekday labels in Angular UI Bootstrap datepicker

为君一笑 提交于 2019-12-11 10:53:56
问题 I'm using Angular UI Bootstrap datepicker with the gm.datepickerMultiSelect extension and I'd like to make weekdays labels clickable, so that I could select all days in the month (like all Wednesdays). I can get/calculate all days of the same weekday and add them to the selected days scope, but as I'm rather new to AngularJS & Bootstrap UI, I can't find the right way to trigger that click event for the labels. 回答1: Angular UI Bootstrap lets you override their directive's templates. You can

Angular UI-Calendar AddEvent doesn't work when $scope.events is populated through Factory

▼魔方 西西 提交于 2019-12-11 09:54:45
问题 As shown in this plunkr example, a new event can be added and displayed when the event is appended to $scope.events directly. However, if I update $scope.events through factory.events, the new event is not displayed on the calendar. http://plnkr.co/edit/BkdzJJ?p=preview This has to be something really simple that I'm missing, but I've been struggling with this issue for weeks now. Can you please help? app = angular.module('myApp'); function CalendarCtrl ($scope, gDataService) { var today =

angular-ui/ui-tinymce setup method in tinymceOptions breaks model binding

…衆ロ難τιáo~ 提交于 2019-12-11 09:37:48
问题 I want to add a custom button to the tinymce toolbar, and added a setup function to tinymceOptions as discribed in the docs: $scope.tinymceOptions = { setup: function (editor) { editor.addButton('myMethod', { //myCode } }, //more options } <textarea ui-tinymce="tinymceOptions" ng-model="model.content"></textarea> Adding the setup function breaks the binding with the model. Content added to the editor is not synched to the model and vice-versa. Are there known issues with this approach?

$http response header message

老子叫甜甜 提交于 2019-12-11 09:27:27
问题 is it possible in anulgarjs to fetch the response header message? in a code similar to that $http.get(url) .success(){ something }.error(status,"headers text message)"{ alert(status+" "+"headers text message or a method to get it"; } in the alert i need to write somthing like that: 500 internal server error. In the console log i can see the error status and text message, what do i have to put in the error case? what is the best way to do that? 回答1: try this $http.get(url) .then(function

Integrate dropdown angular-strap with ng-grid

巧了我就是萌 提交于 2019-12-11 08:24:57
问题 I want to template a cell as a dropdown button. So I created a cell template with a button linked to the dropdown directive. If I create this button outside the grid, it's working but inside the grid it's not. I am not sure but I guess the $scope is not accessible in the template. I created a Plunker that shows the issue 回答1: It looks like a bug to me. The problem is relating to the CSS of .ngCell . Currently the overflow property is set to hidden . Try add this to your css file to overwrite

Typeahead alignment Issue

℡╲_俬逩灬. 提交于 2019-12-11 08:19:33
问题 I am having alignment issue with my Typeahead control. The issue is that is goes out of my screen. I want to make it little left aligned so that it stays on my screen. Basically it should adjust it's placement according to the length of data. If length of data is more it should further shift it to left.Notice that everything that goes out of dark blue color is badly aligned. The other issue is , I am actually displaying 3 suggestions in my Typeahead but one is getting hidden behind the blue

Open AngularUI Bootstrap Typeahead Matches Results via Controller

十年热恋 提交于 2019-12-11 07:14:22
问题 Is there anyway to trigger opening the match results on a typeahead input text box from the controller? use case: user goes to https://example.com/search/searchText controller of page sets the input text to "searchText" (ng-model) on initialization trigger showing the typeahead results from the controller I can only seem to get the typeahead results, obviously, while typing in the input text box. 回答1: I got it to work in a couple ways, but both require changes to ui-bootstrap. I suppose I

AngularJS with AngularUI Bootsrap pagination directive doesn't hide results

冷暖自知 提交于 2019-12-11 06:59:01
问题 I'm trying to use Angular-ui pagination directive for the first time and am confused why it isn't working. I can see the pagination buttons and it properly displays two pages to paginate through since there are 8 results and items-per-page="5" But all my data items are showing and not being hidden to five per page. controller dataService.get(uri).then(function (data) { $scope.testimonials = data; $scope.totalItems = $scope.testimonials.length; $scope.currentPage = 1; $scope.setPage = function

Using angular-ui-bootstrap and a fixed sidebar

拜拜、爱过 提交于 2019-12-11 05:42:25
问题 I've seen several examples of using bootstrap ScrollSpy / Affix, but I'm having a hard time applying that to angular-ui-bootstrap. I would like to have a left-sidebar on my UI, that is fixed (it's position remains even when the rest of the page is scrolling). I have two plnkr's. One shows a non-fixed (but mostly functional) sidebar, the other shows an ALMOST working fixed sidebar - but the content pushes the width out further than it should. In the second example, if I could figure out how to

How to communicate between directive (tree component) and any other controller or directive in AngularJS app?

巧了我就是萌 提交于 2019-12-11 04:50:03
问题 First of all, I have read so much info you all share about communication between controllers, that I'm now so confused about the BEST way to do it. I understand I should use service, but don't really know what it means from the examples you all wrote. Here is my scenario: Left side of my page I have a side bar with a simple folder/files tree. I have used angular Tree Component and it works great for me: http://jimliu.github.io/angular-ui-tree/ On the right side of the page, I have a view that