I can not put to work your code…
Then, can you try to play with Angular2 Components?
Create a new component called button blabla and use inside your Page1 (or whatever page or component…). That works and is dynamic too.
Unfortunately since you’re having to use innerHtml to unsafely display markup, there’s not a whole lot that you can do. You can’t actually target any of that html with javascript. Sadly, there’s nothing you can do about that.
First off, it’s an Angular issue, not an Ionic issue. Secondly, I originally also thought it was a big deal, but it’s so challenging to use things like ng-bind-html and $compile in a secure manner that now I’m actually glad that Angular2 doesn’t let me lean on that particular crutch. I think there’s probably a way for you to do roughly what you want using only *ngFor and custom directives, managing the custom stuff as an iterable in the controller. It’s hard to be more specific until you share more details about exactly what you are trying to achieve.
Based how you’re describing things, no you’re not able to do this in pure angular 2
This is not a bug in Ionic, but an quirk in Angular.
It’s all the best though, say you get html for a third party service, one that you’re not sure if you can trust or not.
They could send down some code that has inline javascript it in. Or that needs javascript to run.
But how do you know if it’s something you can trust.
As @rapropos said, this is good that you cannot do this.