angular-ui

Focus on other input after typeahead-on-select angular-ui-bootstrap

孤者浪人 提交于 2021-02-10 16:22:05
问题 I have a problem with angular-ui bootstrap: I have 2 input: <input type="text" ng-model="selected" uib-typeahead="state for state in states | filter:$viewValue | limitTo:8" typeahead-on-select="focusSuccessive($item, $model, $label, $event)" class="form-control"> <textarea class="form-control" id="message" rows="10" data-ng-model="caller.data.text" tabindex="25"></textarea> And in my controller I have a function focusSuccessive($item, $model, $label, $event)" that should focus textArea after

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 ui-grid: bootstrap dropdown in cell

荒凉一梦 提交于 2020-02-04 03:40:42
问题 I have an agular ui-grid and dropdowns in its cells. Why my dropdown doesn't show on click? var columnDefs1 = [ { name: 'firstName'}, { name: 'lastName'}, { name: 'company'}, { name: 'employed'}, { name: '#', cellTemplate: '<div class="dropdown">' + '<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">' + 'Dropdown' + '<span class="caret"></span>' + '</button>' + '<ul class="dropdown-menu" aria

Angular ui-grid: bootstrap dropdown in cell

白昼怎懂夜的黑 提交于 2020-02-04 03:40:10
问题 I have an agular ui-grid and dropdowns in its cells. Why my dropdown doesn't show on click? var columnDefs1 = [ { name: 'firstName'}, { name: 'lastName'}, { name: 'company'}, { name: 'employed'}, { name: '#', cellTemplate: '<div class="dropdown">' + '<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">' + 'Dropdown' + '<span class="caret"></span>' + '</button>' + '<ul class="dropdown-menu" aria

Dropdown in AngularJS has Correct Text, but Wrong Value

非 Y 不嫁゛ 提交于 2020-01-25 08:03:12
问题 Here's my dropdown: <select class="form-control form-controls input-sm" ng-model="vm.retailer.state" ng-options="state.code as state.name for state in vm.states" required> <option value="">-- Select a State --</option> </select> Here's just the first state in the data: "State": [ { "code": "AL", "name": "Alabama" }, Here's what's being rendered in the HTML: <select class="form-control form-controls input-sm ng-pristine ng-invalid ng-invalid-required ng-touched" ng-model="vm.retailer.state" ng

ng-repeat and ui-if

烂漫一生 提交于 2020-01-21 11:49:12
问题 When I want to use ui-if (anguluarUi) with ng-repeat (and I think it would be most useful there) I Get an error: Error: Multiple directives [uiIf, ngRepeat] asking for transclusion on: <!-- uiIf: oConnection.aOptions --> Is there any way to combine those two? Edit: <ng-repeat><div ui-if>... Is not possible (for now) unfortunately. I know that I can combine ng-show and ng-repeat, but it's not the same. I also don't want to put the ui-if outside of the repeat, as I want to use the values of the

Angular UI Bootstrap date-picker Combined With UI.Mask

[亡魂溺海] 提交于 2020-01-20 21:43:05
问题 I am using the angular UI bootstrap popup date-picker to build a directive that will easily allow me to add the date-picker where need. When I combine this with the uiMask Directive, the values in the input get scrambled when I pick a date. Here is my html : <p class="input-group"> <input type="text" class="form-control" ui-mask="99/99/9999" ng-model="ngModel" ng-model="order.date" datepicker-popup="MM/dd/yyyy" is-open="opened" datepicker-options="dateOptions" date-disabled="disabled(date,

Angular-ui-router: managing dependencies with resolve

Deadly 提交于 2020-01-14 05:06:28
问题 I'm trying to set up routing with the angular-ui-router plugin for angular. Before anything else should happen on the page (no matter which route), the user's data needs to be loaded. Then based on the user's data (id, username, etc.) other data components necessary for the route can be loaded. Is there a pattern for this scenario? I was thinking one way to solve this would be to add the user data as a resolve on every route. However, not only does this seem very redundant and inefficient,

Angular-ui-router: managing dependencies with resolve

最后都变了- 提交于 2020-01-14 05:03:39
问题 I'm trying to set up routing with the angular-ui-router plugin for angular. Before anything else should happen on the page (no matter which route), the user's data needs to be loaded. Then based on the user's data (id, username, etc.) other data components necessary for the route can be loaded. Is there a pattern for this scenario? I was thinking one way to solve this would be to add the user data as a resolve on every route. However, not only does this seem very redundant and inefficient,

{{numPages}} not being calculated by pagination directive

泪湿孤枕 提交于 2020-01-13 19:31:08
问题 I was under the impression with the pagination directive that the {{numPages}} value would be calculated by the directive. It isn't returning anything for me. Is there anything I am missing to get this working properly? I don't want to have to calculate it, if the directive is supposed to be doing this for me. Otherwise paging is working great. <pagination total-items="totalItems" ng-model="currentPage" max-size="maxSize" items-per-page="itemsPerPage" class="pagination-sm" boundary-links=