jjzjj

uibModal

全部标签

javascript - 使用 Jasmine 测试以 uibModal 和 lodash 作为依赖项的服务

这是我第一次使用Jasmine,我已经测试了我的第一个工厂没有问题。但是现在,我想测试这个服务:angular.module('Questions',[]).service('QuestionsService',function($uibModal,$log,_){...}$uibModal来自UIBootstrap(参见here),_是Lodash。到目前为止,我的Jasmine测试是:describe('Service:QuestionsService',function(){varQuestionsService;beforeEach(inject(function(_Quest

javascript - AngularJS 错误未知提供者 : $$jqLiteProvider <- $$jqLite <- $animateCss <- $uibModalStack <- $uibModal

我正在尝试创建一个弹出并提供不同菜单选项的简单模式。这应该很容易,我在uibootstrap网站上按照Plunkerformodals进行操作,但出现错误:$uibModalisanunknownprovider这是Angular代码:angular.module('billingModule',['ngAnimate','ui.bootstrap']);angular.module('billingModule').controller('StoreBillingCtrl',function($scope,$uibModal){$scope.openStoreBilling=func

javascript - 在模式关闭后捕获 Angular Bootstrap UI $uibModal 关闭事件

我正在使用来自另一个Controller的$uibModal.open打开一个模态窗口,并且需要在模态窗口完全关闭时(而不是在关闭期间......)得到通知,这样我就可以运行一个函数.打开模态的代码如下:varmodalInstance=$uibModal.open({templateUrl:"myModalContent.html",controller:"termModalCtrl",windowClass:'app-modal-window',resolve:{'params':function(){returnid}}});我看到了一些建议使用的解决方案:modalInstan

javascript - 通过开放模态函数 Angular uibModal 传递数据

我正在尝试弄清楚如何在弹出时将unit_number传递到模式中。我是Angular的新手,我对resolve:和group:正在做的事情以及如何在返回语句中包含unit_number感到有点困惑。$scope.openTenantModal=function(unit_number){varmodalInstance=$uibModal.open({animation:true,templateUrl:'views/addtenantmodal.html',controller:'AddTenantModalCtrl',size:'large',resolve:{group:func

javascript - Angular uibModal,解析,未知提供者

我正在尝试公开一个“通用”模式-使用Angular的$uibModal-通过服务。这是该服务的定义:angular.module('app').service('CustomModalService',['$uibModal',function($uibModal){varopenCustomModal=function(size,title,message){varactionToPerformOnConfirm=action;varmodalInstance=$uibModal.open({templateUrl:'templates/CustomModal.html',size: