常用到ui-bootstrap的modal,如果要將產生的dialog 實體關閉(關閉dialog),
可以使用下面的程式 。
use $rootScope
when initializing your modal use $rootScope.modalInstance
You can access it anywhere from the application then. Hope this helps
- Remove the $uibModalInstance references
- Instead of "var modalInstance = $uibModal.open({"Use "$rootScope.modalInstance = $uibModal.open({
- Instead of $uibModalInstance.close('a');"Use "$rootScope.modalInstance.close('a');"
沒有留言:
張貼留言
留個話吧:)