Pass a controller to $ionicModal

后端 未结 6 1367
醉酒成梦
醉酒成梦 2020-12-24 01:34

I am wondering if you can pass a controller to the $ionicModal service. Something like.

$ionicModal.fromTemplateUrl(\'templates/login.html\', {
  scope: $sco         


        
6条回答
  •  自闭症患者
    2020-12-24 02:14

    Create a directive to be used inside the modal and inside the directive you can assign the modal it's own controller and scope. If someone wants some example code I can put something up.

提交回复
热议问题