angular-ui-bootstrap

Angular UI Bootstrap Modal: [$injector:unpr] Unknown provider: $uibModalInstanceProvider

此生再无相见时 提交于 2019-12-17 23:32:21
问题 This is a bit strange. When I search this issue online I see many pages of Google results and SO solutions... but none seem to work! In a nutshell, I am trying to implement AngularUI Bootstrap Modal. I keep getting the following error: Error: [$injector:unpr] Unknown provider: $uibModalInstanceProvider <- $uibModalInstance <- addEntryCtrl Here is my HTML: <nav class="navbar navbar-default"> <div class="container"> <span class="nav-col" ng-controller="navCtrl" style="text-align:right"> <a

Inject $uibModalInstance to a controllar not initiated by a $uibModal

妖精的绣舞 提交于 2019-12-17 19:03:33
问题 I have these two views: 1) foo.html <p>Hello {{name}}</p> 2) foo-as-modal.html <div class="modal-header"> <h3 class="modal-title">I'm a modal</h3> </div> <div class="modal-body"> <ng-include src="'foo.html'"></ng-include> </div> <div class="modal-footer"> <button class="btn btn-default" ng-click="cancel()">Close</button> </div> The controller for foo.html is fooController : angular.module('myApp').controller('fooController', ['$scope','$uibModalInstance', function($scope,$uibModalInstance) {

Inject $uibModalInstance to a controllar not initiated by a $uibModal

女生的网名这么多〃 提交于 2019-12-17 19:01:14
问题 I have these two views: 1) foo.html <p>Hello {{name}}</p> 2) foo-as-modal.html <div class="modal-header"> <h3 class="modal-title">I'm a modal</h3> </div> <div class="modal-body"> <ng-include src="'foo.html'"></ng-include> </div> <div class="modal-footer"> <button class="btn btn-default" ng-click="cancel()">Close</button> </div> The controller for foo.html is fooController : angular.module('myApp').controller('fooController', ['$scope','$uibModalInstance', function($scope,$uibModalInstance) {

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 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

Model in a modal window in angularjs is empty

非 Y 不嫁゛ 提交于 2019-12-17 07:53:46
问题 Hello I am using angularjs ui bootstrap and I have one text field in a modal window, which when I try to print it in alert window it is empty. Any reasons why? Here is a plunker of the code. 回答1: Try to change the $scope.testField into $scope.myModel.testField (or user.firstName ...) As mentioned in this video angular JS - best practice (29:19): "Whenever you have ng-model there's gotta be a dot in there somewhere. If you don't have a dot, you're doing it wrong." See updated plunker http:/

Setting options to datepicker in angular-ui bootstrap

痴心易碎 提交于 2019-12-14 03:47:08
问题 I'm trying to use datepicker component from angular-ui bootstrap lib as descibed here: http://angular-ui.github.io/bootstrap/ And I try to set options for the popup picker and accoriding to the documentation I should pass options for datepicker as JSON using the datepicker-options attribute. In my view I have: <div class="row"> <div class="col-md-6"> <p class="input-group"> <input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min="minDate" max="

angular.js select doesn't show the option value in the begining

走远了吗. 提交于 2019-12-14 03:12:59
问题 I am using angular.js and bootstarp - angular-ui-bootstarp. and I found a problem that when using the select, even the option is not empty, the select in the page always show nothing until you click the option list. The first thing I tried is directly put options in the select, and make one option with ng-selected="selected", but no working <select class=" input-sm pull-right" style="margin-right: 5px;" ng-change="selectUserFilter()" ng-model="user_filter_key" > <option >All</option> <option

Is there a way to intercept BootstapUI's $uibModal dismissed event?

随声附和 提交于 2019-12-14 00:44:17
问题 I'm using the modal compoenent from Bootstrap UI (https://angular-ui.github.io/bootstrap/) in Angular to render a modal, and on closing I want to be able to redirect to another state, or at least have a function be called. The problem is I can intercept the close event but whenever I user presses Esc the modal is dismissed and I couldn't find any documentation of catching the dismiss event or assigning a function to the promise that is returned. The code is as follows: var modalInstance =