templateUrl in Popup

Hi,

I want to show a template as content of a popup, but after so many test I haven’t able to do it.

I have the template in www/templates/template.html

<html>
  <head></head>
  <body>
    Template
  </body>
</html>

and this is the popup:

  showAlertPopup(){
         this.popup.alert({
              title: 'Title',
              templateUrl: 'templates/template.html', 
              okText: 'OK',
              okType: ''
         });
  }

But the popup is displayed like this:

Thanks in advantage

I think it is templateUrl referring to the wrong,
try** …/templates/template.html**

No, that isn’t the problem

templateUrl doesn’t work with popup currently, it hasn’t been implemented yet. I opened an issue for it here:
https://github.com/driftyco/ionic2/issues/664

Please use template for now.

1 Like