angular-bootstrap

how can I select a tab from outside controller

一个人想着一个人 提交于 2019-12-11 21:07:52
问题 I'm using Tabs (ui.bootstrap.tabs) control\directive described here. The control creates it's own controller which sets active tab: .controller('TabsetController', ['$scope', function TabsetCtrl($scope) { var ctrl = this, tabs = ctrl.tabs = $scope.tabs = []; ctrl.select = function(selectedTab) { angular.forEach(tabs, function(tab) { if (tab.active && tab !== selectedTab) { tab.active = false; tab.onDeselect(); } }); selectedTab.active = true; selectedTab.onSelect(); }; Tabset child tab

Call angular UI Bootstrap directive from inside custom directive

 ̄綄美尐妖づ 提交于 2019-12-11 08:08:16
问题 currently I'm working on a very extense form and using inputs, textareas, datepickers etc etc on the HTML it will make the code look very ugly and also very hard to read. The thing is that I have created custom directives that returns the proper HTML element e.g.: In the HTML <suggest-input data-ng-model="EDCtrl.headerStep.provider.identification" placeholder="'Ej. 888888-8'" label="'Identificador de emisor'"> </suggest-input> the directive : var suggestInput = function ($compile, $http) {

Angular bootstrap typeahead not working with Angular 1.3.0

谁都会走 提交于 2019-12-07 02:35:45
问题 I have created a small plunker to show that this is not working. Can anyone please help me how to use typeahead with 1.3.0 angularJS /provide alternate solutions. We are using it with angular-bootstrap 0.11.0 and the latest version of bootstrap. Our code heavily relies on ng-messages introduced in 1.3.0 Here is the plunker link As you can clearly see, the click events, up arrows and down arrows dont work. Adding some code to make SO happy. :) <div class="container-fluid" ng-controller=

Passing Data to Twitter Bootstrap Modal in Angular

故事扮演 提交于 2019-12-06 07:49:16
问题 I want to show a modal box asking the user if they want to delete a post or not. I can't figure out how to pass the key which I pass in the key argument in which I also can alert. I took the code from the angular twitterbootstrap site but I can't figure out a method to pass data to confirm the remove. Thanks Mohammad $scope.deletePost = function(key, post, event) { alert(key); var modalInstance = $modal.open({ templateUrl: 'deletePost.html', controller: ModalInstanceCtrl, resolve: { items:

Angular bootstrap typeahead not working with Angular 1.3.0

五迷三道 提交于 2019-12-05 04:54:41
I have created a small plunker to show that this is not working. Can anyone please help me how to use typeahead with 1.3.0 angularJS /provide alternate solutions. We are using it with angular-bootstrap 0.11.0 and the latest version of bootstrap. Our code heavily relies on ng-messages introduced in 1.3.0 Here is the plunker link As you can clearly see, the click events, up arrows and down arrows dont work. Adding some code to make SO happy. :) <div class="container-fluid" ng-controller="TypeaheadCtrl"> <h4>Static arrays</h4> <pre>Model: {{selected | json}}</pre> <input type="text" ng-model=

UI bootstrap carousel first slide doesn't show then crashes at last slide

我怕爱的太早我们不能终老 提交于 2019-12-05 01:53:44
I am trying to implement ui-bootstraps carousel but when the page loads the first image doesn't show but the controls and indicators do. Then, when the second image shows, I can use the controls to go back to the first image and it will show fine. I can use the controls to get to the last slide or let it slide automatically but when I get to the last slide the carousel stops working and gives the error "Cannot read property 'slide' of undefined" which points to line 576 of the ui-bootstrap-tpls.js file. Not sure what I'm doing wrong as this seems pretty simple to implement, here is my code and

Passing Data to Twitter Bootstrap Modal in Angular

橙三吉。 提交于 2019-12-04 11:46:50
I want to show a modal box asking the user if they want to delete a post or not. I can't figure out how to pass the key which I pass in the key argument in which I also can alert. I took the code from the angular twitterbootstrap site but I can't figure out a method to pass data to confirm the remove. Thanks Mohammad $scope.deletePost = function(key, post, event) { alert(key); var modalInstance = $modal.open({ templateUrl: 'deletePost.html', controller: ModalInstanceCtrl, resolve: { items: function() { return $scope.posts; } }, }) modalInstance.result.then(function(selectedItem) { $scope

Is it possible to run one Angular 2 app several times in one page?

試著忘記壹切 提交于 2019-12-01 09:16:42
I'm making migration from asp.net web forms to Angular 4. I'm making it step by step. Replacing one part and placing it in production. I face a problem with loading same Angular app several times in page. For example with code <root tag="table-ep-component" data="5800"></root> <root tag="table-ep-component" data="3333"></root> there is only one loaded app in the page - the first one. How can I make them work both? Any suggestions are welcome You can use Applicationref.bootstrap method to do it working: abstract bootstrap<C>( componentFactory: ComponentFactory<C>|Type<C>, rootSelectorOrNode?:

How to add a button in accordion header in bootstrap 3.0/bootstrap-ui?

旧巷老猫 提交于 2019-12-01 06:05:28
I am trying to add a button to the accordion that has a dropdown menu but it doesn't seem to be working a: 1) button is too big so it goes past the accordions header. 2) The dropdown menu ends up inside the accordion header/group and not on top of everything else. What is the best way to fix these? I want The following is my code for the accordion group: <accordion-group is-open="true"> <accordion-heading> <div class="btn-group" style="float:right;"> <button type="button" class="btn btn-info">Info</button> </div> </accordion-heading> </accordion-group> This post is similar, but I want the

Is it possible to run one Angular 2 app several times in one page?

匆匆过客 提交于 2019-12-01 05:49:36
问题 I'm making migration from asp.net web forms to Angular 4. I'm making it step by step. Replacing one part and placing it in production. I face a problem with loading same Angular app several times in page. For example with code <root tag="table-ep-component" data="5800"></root> <root tag="table-ep-component" data="3333"></root> there is only one loaded app in the page - the first one. How can I make them work both? Any suggestions are welcome 回答1: You can use Applicationref.bootstrap method to