Ionic 1 - is it possible to open and $ionicModal within an $ionicPopup?


#1

Hello everybody,

I have an ionicPopup that when the user click on it’s link (not the buttons but a link inside a paragraph) a modal would open so the user could see the terms of use of my app. This is what I tried so far.

      $ionicPopup.show({
        title: 'Aviso',
        template: '<p>É necessário aceitar os <a href="#" ng-click="openModalTerms()">termos de uso</a>  para finalizar o cadastro.</p>',
        buttons: [
              { text: 'Não concordo'  },
              {
                text: 'Concordo',
                type: 'button-stable',
                onTap: function(e) {
                  defer.resolve(true);
                }
              }
         ]
       });

The problem is that the method is not being called in the controller… I can open a webpage or show content, but it seems impossible to attach a controller method in the ionicPopup’s template.

Am I doing something wrong?

Thanks!