Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Alert Popup with other Angular commands?

$
0
0

@helpmelearn wrote:

We have a Popup Alert.

Can I use Angular commands in the Message or subtile value?

In the message we are building an HTML table to display data.
But in the table I need to use some ngIf to know if I can show some of the values or not.

when I try to use an ngIf they seem to be taken out of the final HTML code.

Basic example.

let innerCode = '<table>' +
                '<tr *ngIf="this.data"><td>' +  this.data  + '</td> </tr>' +
                    '</table>'

let examplePopup = this.alertCtrl.create({
            title: 'My Title'
            subTitle: innerCode ,
            buttons: ['CLOSE']
        });
        examplePopup.present();

I can’t see how Angular would know that this HTML needs to be parse?

Any other suggestions for making a table in an Alert Popup?

— in AngularJS we were able to do this because the HTML was all in one files, then just had a tag to load that table HTML into the popup.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>