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

后端 未结 3 457
猫巷女王i
猫巷女王i 2020-12-09 23:13

I have these two views:

1) foo.html

  

Hello {{name}}

2) foo-as-modal.html

3条回答
  •  被撕碎了的回忆
    2020-12-09 23:58

    You can not use the same controller for a page view and for a modal window. At least, untill controller depends on $uibModalInstance.

    $uibModalInstance can be injected only in modals.

提交回复
热议问题