angular-ui-bootstrap

Angular Error - ReferenceError: $modal is not defined

允我心安 提交于 2021-02-08 14:57:14
问题 I am using code form a tutorial and modifying it a bit. I have run into an issue with the edit feature. I keep getting a "ReferenceError: $modal is not defined" here is my code. postCtrl: app.filter('startFrom', function() { return function(input, start) { if(input) { start = +start; //parse to int return input.slice(start); } return []; } }); app.filter('dateToISO', function() { return function(input) { input = new Date(input).toISOString(); return input; }; }); app.controller('postsCtrl',

Angular Bootstrap UI Datepicker with custom directive $parser causes error: Not a valid date ng model

跟風遠走 提交于 2021-01-29 07:45:57
问题 I am trying to use the angularjs bootstrap ui datepicker directive on an input element that also has another directive that adds a $parser to the model. I get an error because the model object is not a Date object (because the parser causes the mdoel object to be an object with property named, "customValue". The actual error when I select a date is, "Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or

AngularJS / ui-bootstrap accordion - scroll to top of active (open) accordion on click

耗尽温柔 提交于 2021-01-27 04:18:31
问题 When a panel is opened I need to have it scroll back to the ".panel-title" of the one that was just clicked. I know that I can create a directive to do this such as (got this from this site): .directive( 'scrollTop', scrollTop ); function scrollTop() { return { restrict: 'A', link: link }; } function link( $scope, element ) { $scope.collapsing = false; $scope.$watch( function() { return $(element).find( '.panel-collapse' ).hasClass( 'collapsing' ); }, function( status ) { if ( $scope

ui-select-header-group-selectable directive on ui-select-choice does not work

◇◆丶佛笑我妖孽 提交于 2020-05-30 07:09:44
问题 ui-select-header-group-selectable in ui-select-choices makes the headers clickable, so you can select all the items in a group. Am I right or wrong? 回答1: I edited the select.js for my project. I am not keeping real checkboxes, but using glyphicons. example-screenshot https://github.com/maheshparlapalli/modified-ui-select-js-for-group-wise-check-boxes search for 'toggleAllGroupSelected' in select.js, which is newly added function. You will find the usage of 'toggleAllGroupSelected' in multiple

Only use Carousel of bootstrap

走远了吗. 提交于 2020-05-15 09:23:05
问题 I am now using Semantic UI without including Bootstrap as there are some conflicts among them. But I quite like the Carousel function of bootstrap. Can I optionally include it in my project? Thanks a lot! 回答1: Yes, you can customize bootstrap here: http://getbootstrap.com/customize/ Just select the Carousel in Javascript components category and Carousel functionnality in jquery plugins. Then download the files and include them in your project. 来源: https://stackoverflow.com/questions/23991987

UI-bootstrap typeahead does not resolve promise

。_饼干妹妹 提交于 2020-04-30 07:22:46
问题 Problem description Hi, I have a problem with UI-Bootstrap's typeahead, there is standard example on the homepage that demonstrates typeahead usage: http://plnkr.co/edit/LS5OMsnQtdsJ87eW4pjG?p=preview This example works pretty fine until I start using promises with typeahead directive: http://plnkr.co/edit/ZuUBDOPcOJIW0Bkskrb5?p=preview The change is pretty simple, I've replaced direct variable initialisation with delayed initialisation using $timeout service, as a result typeahead stops

Need help on building dynamic search box using bootstrap in Service portal

给你一囗甜甜゛ 提交于 2020-03-25 18:25:14
问题 I am currently working in Servicenow Serivce portal where it support Angular I am able to create a Search box using bootstrap as shown below: Server Code: (function() { /* populate the 'data' object */ /* e.g., data.table = $sp.getValue('table'); */ try { var r = new sn_ws.RESTMessageV2('coronaAPI', 'Default GET'); var response = r.execute(); var responseBody = response.getBody(); var httpStatus = response.getStatusCode(); gs.log(responseBody + "respno"); data.responseBody =responseBody; var

Need help on building dynamic search box using bootstrap in Service portal

前提是你 提交于 2020-03-25 18:25:14
问题 I am currently working in Servicenow Serivce portal where it support Angular I am able to create a Search box using bootstrap as shown below: Server Code: (function() { /* populate the 'data' object */ /* e.g., data.table = $sp.getValue('table'); */ try { var r = new sn_ws.RESTMessageV2('coronaAPI', 'Default GET'); var response = r.execute(); var responseBody = response.getBody(); var httpStatus = response.getStatusCode(); gs.log(responseBody + "respno"); data.responseBody =responseBody; var

$uibModalInstance.close not working

ぐ巨炮叔叔 提交于 2020-02-04 01:53:23
问题 I have the following code: .service('loginModal', function($rootScope, $uibModal) { function updateUserData(user, data) { Object.keys(data).forEach(function(key) { user.facebook[key] = data[key]; }); return user.$update(); } return function() { var instance = $uibModal.open({ templateUrl: 'tpls/modals/login.html', controller: function($scope, $uibModalInstance, facebookService, UserService) { function updateUserData(user, data) { Object.keys(data).forEach(function(key) { user.facebook[key] =

Tab-off ui-bootstrap typeahead only when row is explicitly selected

∥☆過路亽.° 提交于 2020-02-02 10:10:02
问题 I've created this jsBin to demonstrate the issue I'm having. If you go here, try type "Five" and move on. Your natural reaction would be to type "Five" and then press tab, and if you wanted "Five-Hundred," you'd arrow-down once; however, in this case, you have to type "Five" and then either press escape or physically mouse out of the box without clicking any of the other options So, basically, when you're using typeahead, if there is at least one matching result for your current criteria,