angular-ui-bootstrap

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

你。 提交于 2020-02-02 10:08:53
问题 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,

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

[亡魂溺海] 提交于 2020-02-02 10:08:46
问题 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,

Why did my UI Bootstrap datepicker-popup stop working?

谁都会走 提交于 2020-01-24 14:33:47
问题 I updated to UI Bootstrap 0.11.0 and my datepickers stopped appearing as they should. I have a plunker that demonstrates it at here. Very simply, I have: <input ng-model="formData.dueDate" type="text" id="dueDate" name="dueDate" class="form-control" datepicker-popup="MM-dd-yyyy" datepicker-append-to-body="true"> The datepicker pops up correctly using UI Bootstrap 0.10.0 but not with the lastest version. I do not see any errors in the console. This leads me to believe I was possibly using the

How do I dynamically overwrite an Angular2 Injectable Service?

你离开我真会死。 提交于 2020-01-24 14:04:11
问题 I have an injectable service, HttpRequestService, which I would like replace with a MockHttpRequestService when there is no server because I'm running in development mode (npm start). This MockHttpRequestService will send back very simple responses. I thought I'd found a way to dynamically replace my HttpRequestService, but unfortunately I see that HttpRequestService is still being used. Here's what I tried: main.ts import {bootstrap} from '@angular/platform-browser-dynamic'; import {provide}

How do I dynamically overwrite an Angular2 Injectable Service?

爱⌒轻易说出口 提交于 2020-01-24 14:03:27
问题 I have an injectable service, HttpRequestService, which I would like replace with a MockHttpRequestService when there is no server because I'm running in development mode (npm start). This MockHttpRequestService will send back very simple responses. I thought I'd found a way to dynamically replace my HttpRequestService, but unfortunately I see that HttpRequestService is still being used. Here's what I tried: main.ts import {bootstrap} from '@angular/platform-browser-dynamic'; import {provide}

angular bootstrap modal masks forms

旧时模样 提交于 2020-01-24 09:15:11
问题 I am trying to get at an angular form in scope to verify validations etc. Base Case Let us say I have the following HTML: <body ng-controller='MyAwesomeController'> <form name="fooForm"> <textarea ng-model="reason" required=""></textarea> </form> <div class='btn btn-primary' ng-click="submit()" ng-class="{'btn-disabled': true}">Awesome Submit Button</div> </body> And the following controller angular.module('MyAwesomeController', '$scope', function(scope){ scope.submit = function(){ console

angular bootstrap modal masks forms

▼魔方 西西 提交于 2020-01-24 09:14:15
问题 I am trying to get at an angular form in scope to verify validations etc. Base Case Let us say I have the following HTML: <body ng-controller='MyAwesomeController'> <form name="fooForm"> <textarea ng-model="reason" required=""></textarea> </form> <div class='btn btn-primary' ng-click="submit()" ng-class="{'btn-disabled': true}">Awesome Submit Button</div> </body> And the following controller angular.module('MyAwesomeController', '$scope', function(scope){ scope.submit = function(){ console

TypeScript AngularJS component modal - this.$modalInstance.dismiss is not a function?

别等时光非礼了梦想. 提交于 2020-01-22 02:23:30
问题 I've turned one of my user data entry forms into a uib-modal, but I get when I attempt to close the modal from the "cancel"button, I get this error: this.$modalInstance.dismiss is not a function. . Same thing is if use this.modalInstance.close(). Which is weird because TypeScript seems to think those methods should be there based on the code completion in VS Code. Anyway, the basic set up is as follows: Controller which opens the modal: class TestModalController { static $inject = ['$modal'];

How to use UI Bootstrap Pagination for a table, generated using ng-repeat

可紊 提交于 2020-01-19 12:56:05
问题 I am trying to keep pagination in my Angular application using uib-pagination . I am unable to get proper way to do this. HTML <table id="mytable" class="table table-striped"> <thead> <tr class="table-head"> <th>Name</th> </tr> </thead> <tbody> <tr ng-repeat="person in aCandidates"> <th> <div>{{person}}</div> </th> </tr> </tbody> </table> Controller $scope.totalItems = $scope.aCandidates.length; $scope.currentPage = 1; $scope.itemsPerPage = 10; I am able to see the pagination bar but no

How to create a badge inside another?

拜拜、爱过 提交于 2020-01-15 07:13:28
问题 I have submiited an image with a badge inside another badge and i am trying to figure out how they did it? 回答1: Explanation In order to achieve the desired behavior, use the property position: relative in your wrapper element and use position: absolute in the child element. Then position the child element in the top/right corner with top: 0 and right: 0 . The last part will require the CSS3 property transform with the translate attribute. You can read more about it in CSS3 2D Transforms or