angular-ui

AngularJS, animations with ui router which versions work?

雨燕双飞 提交于 2019-12-21 11:54:13
问题 There have been some incompatibilities with ngAnimate and ui.router since the release of Angular 1.2. Which versions of Angular, Angular Animate and Angular UI Router work together? 回答1: The following versions appear to be compatible (installed through bower): { "angular": "1.2.3", "angular-ui-router": "0.2.0", "angular-animate": "1.2.3" } I'll update this list as I discover more combinations. 来源: https://stackoverflow.com/questions/20991255/angularjs-animations-with-ui-router-which-versions

Setting initial values of Angular-UI Select2 multiple directive

心不动则不痛 提交于 2019-12-20 11:31:39
问题 I have a select2 directive for a multiple select of countries with a custom query to grab the data: // Directive <input ng-model="filters.countries" ui-select2="filters.countryOptions" data-placeholder="Choose a country..."> // filters.countryOptions { multiple: true, query: function() { get_list_of_countries(); } } // Formatted data from remote source [ {id: 'US', text: 'United States'}, {id: 'CA', text: 'Canada'} ... ] I'm trying to set the initially selected values in my controller using:

Setting initial values of Angular-UI Select2 multiple directive

偶尔善良 提交于 2019-12-20 11:31:12
问题 I have a select2 directive for a multiple select of countries with a custom query to grab the data: // Directive <input ng-model="filters.countries" ui-select2="filters.countryOptions" data-placeholder="Choose a country..."> // filters.countryOptions { multiple: true, query: function() { get_list_of_countries(); } } // Formatted data from remote source [ {id: 'US', text: 'United States'}, {id: 'CA', text: 'Canada'} ... ] I'm trying to set the initially selected values in my controller using:

What's a good way to control an angular-ui accordion programmatically?

这一生的挚爱 提交于 2019-12-20 10:32:38
问题 I am using the accordion directive from http://angular-ui.github.com/bootstrap/ and I need to have more control over when the accordions open and close. To be more precise I need a button inside the accordion-group that will close its parent accordion and open the next one (so basically mimic what clicking the next header would do if close-others was set to true). I also need to do some validation before I can allow an accordion to be closed and the next one to be opened, and I also need to

How to trigger UI-Router View Load events?

陌路散爱 提交于 2019-12-20 09:16:29
问题 Testing ui-router for the fist time but testing the Events at the moment and I can't seem to understand how to trigger $viewContentLoaded or Loading. Although, I've got stageChangeSuccess, etc working! I just pushed everything to http://punkbit.com/space_competition/ but also added some code here. I expected to trigger the events when a new view is loaded to ui-view. But I guess I'm missing something here! <div class="pure-g"> <div class="pure-u-1" ui-view> </div> </div> <!-- s: template

Adding ui.bootstrap dependency with bower

坚强是说给别人听的谎言 提交于 2019-12-20 08:46:59
问题 I m trying to add ui.bootstrap dependency to my angular project (I m using yeoman, bower). I did this : yo angular bower install angular-ui I then added to my index.html file : and grunt serve Then I added the ui.bootstrap dependency to my app.js: angular.module('angularuiprojectApp', [ 'ngCookies', 'ngResource', 'ngSanitize', 'ngRoute', 'ui.bootstrap']) When I m trying to access to my index.html on Chrome I m getting this error : Uncaught Error: [$injector:modulerr] Failed to instantiate

How do I prevent angular-ui modal from closing?

非 Y 不嫁゛ 提交于 2019-12-20 08:10:53
问题 I am using Angular UI $modal in my project http://angular-ui.github.io/bootstrap/#/modal I don't want user to close the modal by pressing on backdrop. I want a modal can only be closed by pressing close button which I have created. How do I prevent modal from closing ? 回答1: While you creating your modal you can specify its behavior: $modal.open({ // ... other options backdrop : 'static', keyboard : false }); 回答2: backdrop : 'static' Will work for 'click' events but still you can use "Esc" key

How do I prevent angular-ui modal from closing?

跟風遠走 提交于 2019-12-20 08:10:15
问题 I am using Angular UI $modal in my project http://angular-ui.github.io/bootstrap/#/modal I don't want user to close the modal by pressing on backdrop. I want a modal can only be closed by pressing close button which I have created. How do I prevent modal from closing ? 回答1: While you creating your modal you can specify its behavior: $modal.open({ // ... other options backdrop : 'static', keyboard : false }); 回答2: backdrop : 'static' Will work for 'click' events but still you can use "Esc" key

How can i get rid of $parent in angular

老子叫甜甜 提交于 2019-12-20 03:52:29
问题 Here's Plunker I have an external template within in a controller with ng-include. It is shown and hidden based on click event of Button.It is working as required but with $parent in ng-include Template.Is there any other better way of doing this ? Html <body ng-controller="MainCtrl"> <div data-ng-include="'terms.html'" data-ng-show="otherContent"></div> <div ng-show="mainPage"> <p>Hello {{name}}!</p> <button data-ng-click="mainPage=false; otherContent=true">Link to some Content</button> <

ng-model is not getting changed in ui-select

霸气de小男生 提交于 2019-12-19 12:33:41
问题 I'm trying to achieve something very straightforward: <ui-select multiple ng-model="company.stack" theme="bootstrap"> <ui-select-match>{$$item.name$}</ui-select-match> <ui-select-choices repeat="technology in technologies | filter: $select.search"> <div ng-bind-html="technology.name | highlight: $select.search"></div> </ui-select-choices> </ui-select> When changing the objects, the changes are not reflected in the model company.stack. I tried changing it to $parent.company.stack, but it still