angular-ui

Angular Bootstrap Modal leaves backdrop open

☆樱花仙子☆ 提交于 2019-12-17 18:48:15
问题 I'm using AngularUI to integrate Bootstrap components in my Angular 1.4 app, such as Modals. I'm calling a Modal in my controller like so: var modalInstance = $modal.open({ animation: true, templateUrl: '/static/templates/support-report-modal.html', controller: 'ModalInstanceCtrl' }); Unfortunately, when I want to close the Modal by using: modalInstance.close(); The modal itself dissapears, and the backdrop also fades out, but it isn't removed from the DOM, so it overlays the whole page

Create Hoverable popover using angular-ui-bootstrap

*爱你&永不变心* 提交于 2019-12-17 18:42:22
问题 I have the following code for creating a popover in my template file: <span class="icon-globe visibility" id="visibilityFor{{post.metaData.assetId}}" popover="{{post.visibilityListStr}}" popover-placement="right" popover-trigger="mouseenter" popover-popup-delay="50" visibility> </span> I have a few clickable links on the popover. But the problem is I'm not able to hover on the popover created. I referred to the link http://jsfiddle.net/xZxkq/ and tried to create a directive viz. 'visibility'

Angular UI-Router passing data between states with go function does not work

别来无恙 提交于 2019-12-17 15:58:13
问题 I just started learning angularjs and I am using angular-ui-router. I am trying to send data from one state to another using $state.go but I have no success. Here is what I have so far: I have not included the html intentionally because I assumed it was not needed if it is needed please tell me and I will add it. I have configured my states as below: $stateProvider .state('public', { abstract: true, templateUrl: 'App/scripts/main/views/PublicContentParent.html' }) .state('public.login', { url

How do I use angularjs directives in generated d3 html?

纵饮孤独 提交于 2019-12-17 15:35:58
问题 I'm trying to use the angularjs tooltip directive on my d3 visualisation, so I have something like var node = svg.selectAll(".node") .data(nodes) .enter().append("circle") .attr("tooltip-append-to-body", true) .attr("tooltip", function(d) { return d.name; }) // ... attributes However, the tooltips are not showing. Do I need to $compile or something? I've tried wrapping it around $timeout too, but that didn't work. 回答1: I had a similar problem and yes, solved it with $compile . I'm assuming

How to set aggregation with grouping in ng-grid

ぃ、小莉子 提交于 2019-12-17 15:35:18
问题 I want to see totals (or generally any aggregation function) for each group in a grid. This was requested and closed as done in issue: https://github.com/angular-ui/ng-grid/issues/95 (but unfortunately without any example). I am able to redefine default template https://github.com/angular-ui/ng-grid/blob/master/src/templates/aggregateTemplate.html by aggregateTemplate config option. But I don't know how to extend it properly. This template is evaluating in ng-grid scope and I don't know how

Angular ui-grid dynamically calculate height of the grid

假如想象 提交于 2019-12-17 15:34:41
问题 I am using : https://github.com/angular-ui/ui-grid.info/tree/gh-pages/release/3.0.0-RC.18 <div ui-grid="gridOptions" style="height:765px"></div> When I hard code the value, as shown above, the grid spreads out and everything works as expected. However, if I do the following... $scope.gridStyle = 'height:'+numRows*rowHeight+'px' //(765px); <div ui-grid="gridOptions" style="{{gridStyle}}"></div> The height is printed in the div and div widens but the content itself widens to only around 340px.

Angular bootstrap datepicker date format does not format ng-model value

喜夏-厌秋 提交于 2019-12-17 08:56:09
问题 I am using bootstrap date-picker in my angular application. However when I select a date from that date-picker underlying ng-model that I have bind gets updated I want that ng-model in one date format 'MM/dd/yyyy'. but it every times makes date like this "2009-02-03T18:30:00.000Z" instead of 02/04/2009 I have created a plunkr for the same plunkr link My Html and controller code is like below <!doctype html> <html ng-app="plunker"> <head> <script src="//ajax.googleapis.com/ajax/libs/angularjs

Directing the user to a child state when they are transitioning to its parent state using UI-Router

别等时光非礼了梦想. 提交于 2019-12-17 08:04:58
问题 Consider the following: .state('manager.staffList', {url:'^/staff?alpha', templateUrl: 'views/staff.list.html', data:{activeMenu: 'staff'}, controller: 'staffListCtrl'}) .state('manager.staffDetail', {url:'^/staff/{id}' , templateUrl: 'views/staff.html', data:{activeMenu: 'staff'}, controller: 'staffDetailsCtrl'}) .state('manager.staffDetail.view', {url:'/view', templateUrl: 'views/staff.details.html', data:{activeMenu: 'staff'}}) .state('manager.staffDetail.view.schedule', {url:'/schedule',

Otherwise on StateProvider

蓝咒 提交于 2019-12-17 04:52:10
问题 Using angular-ui-router, How can I use the otherwise method on $stateProvider or how can I use it at all ? 回答1: You can't use only $stateProvider . You need to inject $urlRouterProvider and create a code similar to: $urlRouterProvider.otherwise('/otherwise'); The /otherwise url must be defined on a state as usual: $stateProvider .state("otherwise", { url : '/otherwise'...}) See this link where ksperling explains 回答2: You can with $stateProvider using the catch all syntax ( "*path" ). You just

How to reload the current state?

本秂侑毒 提交于 2019-12-16 20:34:07
问题 I'm using Angular UI Router and would like to reload the current state and refresh all data / re-run the controllers for the current state and it's parent. I have 3 state levels: directory.organisations.details directory.organisations contains a table with a list of organisations. Clicking on an item in the table loads directory.organisations.details with $StateParams passing the ID of the item. So in the details state I load the details for this item, edit them and then save data. All fine