angular-strap

How to watch for an Aside closing in angular-strap

时光总嘲笑我的痴心妄想 提交于 2019-12-08 04:07:05
问题 I'm using angular-strap to show an Aside, and want to react to the user closing it (to cancel a background computation). This can easily be done if the user clicks on x or the close-button I added, but the user can also close the aside by clicking on the grayed-out background. Is there any generic method to watch for the Aside closing? $destroy is not emitted on the scope. 回答1: You can listen for 'modal-hide' event: $scope.$on('modal.hide', function() { console.log('modal-hide'); }); check

Responsive navbar collapsing animation with AngularStrap

余生颓废 提交于 2019-12-07 22:16:58
问题 I'm trying to recreate collapsible Bootstrap responsive navbar with AngularStrap. Here is plunker: <div class="navbar navbar-inverse"> <div class="container" bs-collapse start-collapsed="true"> <div class="navbar-header"> <button class="navbar-toggle" type="button" bs-collapse-toggle> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div bs-collapse-target> <ul class="nav navbar-nav"> <li> <a href="#">Link</a> </li> <li> <a href="#"

Display AngularStrap Dropdown Manually - How?

我们两清 提交于 2019-12-06 17:53:55
问题 I am trying to display an AngularStrap dropdown manually, leveraging the trigger configuration on $dropdownProvider as such // how dropdown is triggered - click | hover | focus | manual app.config(function($dropdownProvider) { angular.extend($dropdownProvider.defaults, { trigger: 'manual' }); }); click hover focus all work fine, but why not manual ? I have yet to discover any proof that this offered api configuration option works. How can I do this? In fact, this issue seems to have been

How to watch for an Aside closing in angular-strap

北战南征 提交于 2019-12-06 15:34:54
I'm using angular-strap to show an Aside, and want to react to the user closing it (to cancel a background computation). This can easily be done if the user clicks on x or the close-button I added, but the user can also close the aside by clicking on the grayed-out background. Is there any generic method to watch for the Aside closing? $destroy is not emitted on the scope. You can listen for 'modal-hide' event: $scope.$on('modal.hide', function() { console.log('modal-hide'); }); check out that plunker: http://plnkr.co/edit/f6l0KBMiSsknRpeXLo9P 来源: https://stackoverflow.com/questions/25531410

AngularJS - Add computation value from a function to the scope

梦想与她 提交于 2019-12-06 13:04:30
I have two datepicker fields which is implemented using AngularStrap datepicker directives: http://mgcrea.github.io/angular-strap/ . <input type="text" name="startDate" ng-model="startDate" data-date-format="dd/mm/yyyy" placeholder="DD/MM/YYYY" bs-datepicker /> <button type="button" class="btn" data-toggle="datepicker"> <i class="icon-calendar"></i> </button> <input type="text" name="endDate" ng-model="endDate" data-date-format="dd/mm/yyyy" placeholder="DD/MM/YYYY" bs-datepicker /> <button type="button" class="btn" data-toggle="datepicker"> <i class="icon-calendar"></i> </button> I also have a

Responsive navbar collapsing animation with AngularStrap

二次信任 提交于 2019-12-06 04:18:45
I'm trying to recreate collapsible Bootstrap responsive navbar with AngularStrap. Here is plunker : <div class="navbar navbar-inverse"> <div class="container" bs-collapse start-collapsed="true"> <div class="navbar-header"> <button class="navbar-toggle" type="button" bs-collapse-toggle> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div bs-collapse-target> <ul class="nav navbar-nav"> <li> <a href="#">Link</a> </li> <li> <a href="#">Link</a> </li> </ul> </div> </div> </div> bs-collapse directive fits Bootstrap navbar quite easily,

Display AngularStrap Dropdown Manually - How?

萝らか妹 提交于 2019-12-04 23:19:47
I am trying to display an AngularStrap dropdown manually, leveraging the trigger configuration on $dropdownProvider as such // how dropdown is triggered - click | hover | focus | manual app.config(function($dropdownProvider) { angular.extend($dropdownProvider.defaults, { trigger: 'manual' }); }); click hover focus all work fine, but why not manual ? I have yet to discover any proof that this offered api configuration option works. How can I do this? In fact, this issue seems to have been discovered after my original question positing, but is now closed and over a year later I have yet to find

How to hide/show same modal instance with AngularJS?

旧时模样 提交于 2019-12-04 02:16:13
I'm currently using angular-ui-bootstrap $modal to display a dialog which lets the user search for and pick a file. The list of files comes from box.com, so I use the box API to search for files and generate a thumbnail to display beside each file in the search result. Thumbnail generation is quite slow and the user needs to call this search dialog multiple times in the same page. So it would be helpful for the user if the search dialog would contain the previous search results when re-opened. The question is how can I re-use (i.e. show/hide) the same modal instance ? Angular-ui seems to

Angular-Strap Radio Button won't update model

北战南征 提交于 2019-12-03 14:13:22
I want to have a radio-button group as you can see in my code. I use AngularJs, Angular-Strap and Bootstrap. The problem is, that my variables in the controller won't update when I click another button. The default value is set. If i remove the labels around the input tags, the update occurs... I don't know if this is a bug, or if I am making something wrong.. I hope I provided any information you need. Thanks for any help!! Versions: AngularJS: 1.2.16 AngularStrap: 2.0.2 Bootstrap :3 HTML: <link href="Content/bootstrap.min.css" rel="stylesheet" /> <link href="Content/style.css" rel=

AngularStrap tabs load html fragment

久未见 提交于 2019-12-03 09:47:05
问题 I am currently working on an AngularJS project with Twitter Bootstrap, and am trying to shift my Bootstrap directives into Angular. I decided on AngularStrap as it provided support for Bootstrap-Select (which I wasn't sure was the same for AngularUI). The tabs example only covered static html though. Is there any way via AngularStrap or AngularJS to load html fragments dynamically, so that it is only called when the tab is clicked? My html fragments need to execute javascript as well. My