angular-ui

How can I pass option changes to Angular-UI ui-select2?

烈酒焚心 提交于 2019-12-11 04:43:22
问题 angular-ui's ui-select2 documentation shows that you can do something like the following: myAppModule.controller('MyController', function($scope) { $scope.select2Options = { allowClear:true }; }); <select ui-select2="select2Options" ng-model="select2"> <option value="one">First</option> <option value="two">Second</option> <option value="three">Third</option> </select> However, changes to $scope.select2Options after that point do nothing. It would be nice if ui-select2 would watch

Angular-UI-Calendar TypeError: Cannot read property 'length' of undefined

我只是一个虾纸丫 提交于 2019-12-11 03:44:13
问题 I'm getting this error repeatedly, although once the app fully initializes, it works fine. Environment: liveaddress.js jquery 1.10.2 jqueryui 1.10.4 angular 1.2.15 (base, -route, -cookies, -resource, -sanitize) foundation foundation-tpls-0.1.0 modernizr 5.2.1 fullcalendar 1.6.4 angular-ui-calendar 0.8.0 I've pulled out pieces of this, but no change. The source JSON looks like this: [{"title":"A Night in Old Havana","start":"2013-04-21T07:00:00Z","status":"COMPLETED","id":

Angular ui-bootstrap accordion not working

こ雲淡風輕ζ 提交于 2019-12-11 02:51:35
问题 An example copied directly from http://angular-ui.github.io/bootstrap/ Does not work at all, neither locally nor in plunker. Don't know why. Bootstrap CSS is loaded, so is ui-bootstrap-tpls.min.js and angular.min.js (angular itself is working just fine though). Here's the plunker: http://plnkr.co/edit/15GWWFSUwab4VmaxfFPf I am getting no js errors in a browser, yet it's not working. Please help. I need to get this working on my website (i.e. the accordion doesn't work even when I write my own

select2 dropdown selected value doesn't get updated with the updated model

会有一股神秘感。 提交于 2019-12-11 02:33:02
问题 I use the latest select2 api (select2-3.4.5) and my html for select 2 looks like this. <select ui-select2 id="select2-test" ng-model="mymodel.myTitle"> <option value="">Title</option> <option ng-repeat="title in nameList" value="{{title.key}}">{{title.name}}</option> </select> I am performing a save call in my controller which saves the model and reloads the saved model back. This is done inside the following block. $timeout(function(){ //if(!$scope.$$phase){ $scope.$apply(function(){ /

How to assign value to angular pagination custom template?

半城伤御伤魂 提交于 2019-12-11 00:33:08
问题 I am using custom template for angular pagination: <uib-pagination boundary-links="(vm.pagination.boundaryLinks == false) ? false : true" num-pages="vm.pagination.numPages" total-items="vm.pagination.totalItems" items-per-page="vm.pagination.itemsPerPage" ng-model="vm.pagination.currentPage" max-size="(vm.pagination.pager == true) ? 0 : 10" template-url="pagination.html" ng-change="vm.pagination.pageChanged(vm.pagination)"> </uib-pagination> <script id="pagination.html" type="text/ng-template

Angular-ui-router child state with multiple parent states

☆樱花仙子☆ 提交于 2019-12-11 00:08:24
问题 Using Angular-ui-router , is there a possibility to define a child-state that has multiple parent states : $stateProvider .state("parent1", { url: '/', templateUrl: 'parent1.html' }) .state('parent2', { url: '/parent2', templateUrl: 'parent2.html' }) //Make accessible from every state parent-state .state("child", { url: 'child', //TODO parents: ['parent1', 'parent2'] onEnter: function() { //do something; } }) Example : Your Angular app has a directive that is used multiple times in different

Filter in ui-sref

耗尽温柔 提交于 2019-12-10 23:29:51
问题 I am trying to apply a filter on a parameter in my ui-sref reference. <a ui-sref="item.show({ itemId: item.id, itemName: item.name | slugify })"> However, the above is not working. How to I apply the slugify filter to item.name ? 回答1: You can use a function: <a ui-sref="item.show({ itemId: item.id, itemName: getSlugifiedName(item) })"> And in your controller, something like that: $scope.getSlugifiedName = function (item) { return $filter('slugify')(item.name); } 回答2: Use parentheses for

Adding Pace.js loader to angular.js modal containing videos

六月ゝ 毕业季﹏ 提交于 2019-12-10 22:45:32
问题 I have angular ui bootstrap modal which has videos, I have posted same question week ago here is the link of that question my previous question , but did'nt got any response, anyhow i found pace.js adds loader automatically. Now can anybody tell me how do i add pace.js loader for modal containing videos. I have added this loader for my pages in app but not getting how to use with modal. Thanks This is the snap where two pace loaders collaborating 来源: https://stackoverflow.com/questions

How to dynamically change the URL in Select2 using AJAX?

纵饮孤独 提交于 2019-12-10 21:53:41
问题 I am using ui-select2 in angularjs for remote data access. I am having a drop down, based on the value chosen in dropdown the URL present in the ajax call should change dynamically , so that I can get the data from that particular URL. Is it possible to change the URL dynamically based on the value present in the dropdown? 回答1: I've resolved this problem using function in ajax property: ajax: { url: function () { return '/product/' +$scope.campaign.advertiser + '/tags/'; }, ... } 来源: https:/

Angular UI datepicker in ng-repeat works only for first block

核能气质少年 提交于 2019-12-10 21:04:29
问题 When I am using the angular ui datepicker within an ng-repeat block, the datepicker works correctly only for the first block. For the remaining repeated blocks, although the calender is displayed, a date cannot be selected. Can someone please tell me how I could get it working? I tried to append the model name with a $parent but that didnt help. I have a list of products and for each product there is a new release form which has two date fields. I am using ng-repeat to display the products