angular-ui-modal

Angularjs UI bootstrap temporarily change URL on open and revert to original URL on close

空扰寡人 提交于 2019-12-22 07:12:09
问题 I want to temporarily change the browser url when the ui bootstrap modal is opened ( The page behind should remain as is, only the url changes ). When the modal is closed the url should be reverted back to the original one. Steps : User loads the page url : xyz.com/home User clicks a link opens a modal url : xyz.com/detail/123 possible solution : changing url with html5 push state problem : Angular ui-router tries to run its routes as per the changed url, eventually changing the background

catching Angular Bootstrap UI $uibModal closed event after the modal was closed

不想你离开。 提交于 2019-12-22 03:18:27
问题 I'm opening a modal window using $uibModal.open from another controller, and need to be notified when the modal window was closed completely (and not during closing...) so I'll be able to run a function. The code that opens the modal is as follows: var modalInstance = $uibModal.open({ templateUrl: "myModalContent.html", controller: "termModalCtrl", windowClass: 'app-modal-window', resolve: { 'params': function () { return id } } }); I saw some suggested solutions to use: modalInstance.result

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

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 =

Angularjs UI bootstrap temporarily change URL on open and revert to original URL on close

夙愿已清 提交于 2019-12-05 09:03:41
I want to temporarily change the browser url when the ui bootstrap modal is opened ( The page behind should remain as is, only the url changes ). When the modal is closed the url should be reverted back to the original one. Steps : User loads the page url : xyz.com/home User clicks a link opens a modal url : xyz.com/detail/123 possible solution : changing url with html5 push state problem : Angular ui-router tries to run its routes as per the changed url, eventually changing the background page. User closes the modal url : xyz.com/home possible solution : html5 pop state problem : Reloads the

catching Angular Bootstrap UI $uibModal closed event after the modal was closed

我的未来我决定 提交于 2019-12-05 01:55:04
I'm opening a modal window using $uibModal.open from another controller, and need to be notified when the modal window was closed completely (and not during closing...) so I'll be able to run a function. The code that opens the modal is as follows: var modalInstance = $uibModal.open({ templateUrl: "myModalContent.html", controller: "termModalCtrl", windowClass: 'app-modal-window', resolve: { 'params': function () { return id } } }); I saw some suggested solutions to use: modalInstance.result.then(function(result) { }); The problem is that the function callback is called prior to the actual

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

六月ゝ 毕业季﹏ 提交于 2019-11-28 20:28:48
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 class="btn pill" ng-click="open()" aria-hidden="true">Add New</a> </span> </div> </nav> Here is my

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

旧城冷巷雨未停 提交于 2019-11-28 08:48:53
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) { $scope.name = "John" $scope.cancel = function () { $uibModalInstance.dismiss('cancel'); }; }]); I need